#im trying to spawn a 3D entity using a spawner but im not sure how to script it can someone help me

1 messages · Page 1 of 1 (latest)

patent hearth
#

i was thinking of summoning the boss via the command i use to usually spawn her which is cmdr : KTSspawn (user) Eto.

winged shore
#

If you need any extra help send me through Dms

patent hearth
patent hearth
winged shore
#

@patent hearth your dms are not open bu here is the script:

patent hearth
#

my bad

winged shore
#

try this, this script goes inside ServerScriptService. :
'''local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Workspace = game:GetService("Workspace")

-- config
local SPAWN_TIME = 3600 -- Time in seconds
local BOSS_NAME = "Eto"
local RIG_NAME = "EtoBossRig" -- The name of the model inside the module

-- paths (Change it if needed)
local MobsFolder = ReplicatedStorage:WaitForChild("KTNPCHandler"):WaitForChild("Mobs")

-- Make sure you have a Part in workspace named "BossSpawnLocation"
local SpawnPart = Workspace:WaitForChild("BossSpawnLocation")

while true do
print("Timer started: Waiting " .. SPAWN_TIME .. " seconds for " .. BOSS_NAME)

task.wait(SPAWN_TIME)

local bossModule = MobsFolder:FindFirstChild(BOSS_NAME)

if bossModule then
    local originalRig = bossModule:FindFirstChild(RIG_NAME)

    if originalRig then
        local clone = originalRig:Clone()
        clone.Parent = Workspace


        clone:PivotTo(SpawnPart.CFrame + Vector3.new(0, 5, 0)) -- Adds 5 studs height so she doesn't get stuck in the floor

        print("SUCCESS: " .. BOSS_NAME .. " has spawned")
        -- Optional: Send a message to chat telling players boss spawned
        game.StarterGui:SetCore("ChatMakeSystemMessage", {
            Text = "boss has spawend";
            Color = Color3.fromRGB(255, 0, 0);
        })
    else
        warn("Script Error: Could not find '" .. RIG_NAME .. "' inside the Eto Module.")
    end
else
    warn("Script Error: Could not find the '" .. BOSS_NAME .. "' Module in KTNPCHandler.")
end

end'''

patent hearth
gusty yokeBOT
#

studio** You are now Level 2! **studio

winged shore
patent hearth
#

im currently at the exact place where the boss is supposed to be but hes not here

#

there is no error in the feedback eithert

#

i also put 20 seconds to spawn just to test if it worked

#

is it because the part isnt anchored?

patent hearth
winged shore
#

okay try this:
'''local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Workspace = game:GetService("Workspace")

local SPAWN_TIME = 20
local BOSS_NAME = "Eto"
local RIG_NAME = "EtoBossRig"

local MobsFolder = ReplicatedStorage:WaitForChild("KTNPCHandler"):WaitForChild("Mobs")

-- important: match your part name exactly:
local SpawnPart = Workspace:WaitForChild("bossspawnlocation") -- changed here

while true do
print("Waiting", SPAWN_TIME, "seconds to spawn", BOSS_NAME)
task.wait(SPAWN_TIME)

local bossModule = MobsFolder:FindFirstChild(BOSS_NAME)
if not bossModule then
    warn("Could not find mob:", BOSS_NAME)
    continue
end

local originalRig = bossModule:FindFirstChild(RIG_NAME)
if not originalRig then
    warn("Could not find rig:", RIG_NAME, "inside", bossModule:GetFullName())
    continue
end

local clone = originalRig:Clone()
clone.Parent = Workspace
clone:PivotTo(SpawnPart.CFrame + Vector3.new(0, 5, 0))

print("Spawned", BOSS_NAME)

end'''

patent hearth
#

im thinking are you sure its seconds and not minutes

#

idk if this could help but we got spawns in their rooms which we wanted to change we wanted to make the world spawn in the open world and not in raid rooms

#

the thing is

#

it spawns when the raid is launched

#

wait i think i know how to fix it

#

the part parent needs to be the boss

#

@winged shore

winged shore
# patent hearth the part parent needs to be the boss

If you’re using your own spawner script the one that does clone:PivotTo(SpawnPart.CFrame., then no the spawn Part does not need to be parented to the boss. It can be anywhere, as long as your script can find it the correct WaitForChild path.

patent hearth
#

the name aswell

#

OH WAIT

#

their all in serverstorage

#

not replicated

#

lemme try again

winged shore
patent hearth
winged shore
#

so check the following

  1. Script in ServerScriptService
  2. Verify the spawn part exists and the name matches exactly (local SpawnPart = workspace:WaitForChild("bossspawnlocation"))
    3, Confirm KTNPCHandler + Mobs exist before the raid starts
  3. Confirm the boss rig source actually exists (local SpawnPart = workspace:WaitForChild("bossspawnlocation"))
gusty yokeBOT
#

studio** You are now Level 3! **studio

patent hearth
#

lemme check again for the rig source

#

yup everything is here

winged shore
#

here: ''' local ServerStorage = game:GetService("ServerStorage")
local Workspace = game:GetService("Workspace")

local SPAWN_TIME = 20

print("BossSpawn running")

-- Spawn location
local SpawnPart = Workspace:WaitForChild("bossspawnlocation", 10)
assert(SpawnPart, "Missing Workspace.bossspawnlocation (check name/case)")

-- GameData package (where your screenshot shows the assets)
local gameData = ServerStorage:FindFirstChild("GameData", true)
assert(gameData, "Could not find 'GameData' anywhere in ServerStorage")

local handler = gameData:WaitForChild("ServerScriptService"):WaitForChild("ServerRelated"):WaitForChild("KTNPCHandler")
local rig = handler:WaitForChild("Mobs"):WaitForChild("Eto"):WaitForChild("EtoBossRig")

print("Found rig at:", rig:GetFullName())
print("Found spawn at:", SpawnPart:GetFullName())

while true do
print("Waiting", SPAWN_TIME, "seconds...")
task.wait(SPAWN_TIME)

local clone = rig:Clone()
clone.Parent = Workspace
clone:PivotTo(SpawnPart.CFrame * CFrame.new(0, 5, 0))

print("Spawned EtoBossRig:", clone:GetFullName())

end '''

patent hearth
#

oh it works now but she noclips throught the ground

winged shore
# patent hearth https://medal.tv/fr/games/roblox-studio/clips/m0nIBZKJIUOVXifml?invite=cr-MSxDYV...

enable CanCollide to model if its already on then add this to the spawn script Add this right after cloning: ''' local PhysicsService = game:GetService("PhysicsService")

local function forceCollisions(model)
for _, inst in ipairs(model:GetDescendants()) do
if inst:IsA("BasePart") then
inst.Anchored = false
inst.CanCollide = true
PhysicsService:SetPartCollisionGroup(inst, "Default")
end
end
end '''
then withn the loop add this: ' local clone = rig:Clone()
clone.Parent = workspace

forceCollisions(clone)

clone:PivotTo(SpawnPart.CFrame * CFrame.new(0, 8, 0)) -- spawn a bit higher"

patent hearth
#

like this ?

#

i think i fucked it up

#

``local ServerStorage = game:GetService("ServerStorage")
local Workspace = game:GetService("Workspace")

local SPAWN_TIME = 20

print("BossSpawn running")

-- Spawn location
local SpawnPart = Workspace:WaitForChild("bossspawnlocation", 10)
assert(SpawnPart, "Missing Workspace.bossspawnlocation (check name/case)")

-- GameData package (where your screenshot shows the assets)
local gameData = ServerStorage:FindFirstChild("GameData", true)
assert(gameData, "Could not find 'GameData' anywhere in ServerStorage")

local handler = gameData:WaitForChild("ServerScriptService"):WaitForChild("ServerRelated"):WaitForChild("KTNPCHandler")
local rig = handler:WaitForChild("Mobs"):WaitForChild("Eto"):WaitForChild("EtoBossRig")

print("Found rig at:", rig:GetFullName())
print("Found spawn at:", SpawnPart:GetFullName())

while true do
print("Waiting", SPAWN_TIME, "seconds...")
task.wait(SPAWN_TIME)

local clone = rig:Clone()
clone.Parent = workspace

forceCollisions(clone)

clone:PivotTo(SpawnPart.CFrame * CFrame.new(0, 8, 0)) -- spawn a bit higher

print("Spawned EtoBossRig:", clone:GetFullName())
local PhysicsService = game:GetService("PhysicsService")

local function forceCollisions(model)
    for _, inst in ipairs(model:GetDescendants()) do
        if inst:IsA("BasePart") then
            inst.Anchored = false
            inst.CanCollide = true
            PhysicsService:SetPartCollisionGroup(inst, "Default")
        end
    end
end

end ``

winged shore
#

like this:

#

local ServerStorage = game:GetService("ServerStorage")
local Workspace = game:GetService("Workspace")
local PhysicsService = game:GetService("PhysicsService")

local SPAWN_TIME = 20

print("BossSpawn running")

local function forceCollisions(model)
for _, inst in ipairs(model:GetDescendants()) do
if inst:IsA("BasePart") then
inst.Anchored = false
inst.CanCollide = true
PhysicsService:SetPartCollisionGroup(inst, "Default")
end
end
end

-- Spawn location
local SpawnPart = Workspace:WaitForChild("bossspawnlocation", 10)
assert(SpawnPart, "Missing Workspace.bossspawnlocation (check name/case)")

-- GameData package path (from your screenshot)
local gameData = ServerStorage:FindFirstChild("GameData", true)
assert(gameData, "Could not find 'GameData' anywhere in ServerStorage")

local handler = gameData
:WaitForChild("ServerScriptService")
:WaitForChild("ServerRelated")
:WaitForChild("KTNPCHandler")

local rig = handler:WaitForChild("Mobs"):WaitForChild("Eto"):WaitForChild("EtoBossRig")

print("Found rig at:", rig:GetFullName())
print("Found spawn at:", SpawnPart:GetFullName())

while true do
print("Waiting", SPAWN_TIME, "seconds...")
task.wait(SPAWN_TIME)

local clone = rig:Clone()
clone.Parent = Workspace

forceCollisions(clone)
clone:PivotTo(SpawnPart.CFrame * CFrame.new(0, 8, 0)) -- spawn higher

print("Spawned EtoBossRig:", clone:GetFullName())

end

patent hearth
#

thank you

patent hearth
#

gimme a sec

#

nop i just dont have any game data ?

#

there is a small issue with spawn time aswell

#

wait

#

i do

#

but it disappear when the test launch

winged shore
#

so it works now

patent hearth
#

i'll record a clip

#

okay my bad

#

its bcs i removed coma

#

this error is still here

gusty yokeBOT
#

studio** You are now Level 4! **studio

patent hearth
#

i think its because of that

#

so uh she spawns

#

without her AI and anims

winged shore
#

Uh I help when I get home if you haven't fixed it by then

patent hearth