#LocalScript spawnpoint doesnt work

26 messages · Page 1 of 1 (latest)

stiff hearth
#

I got this script:

a = game.Players.LocalPlayer.Character:WaitForChild('Humanoid')
a.Died:Connect(function()
    print('Death')
    workspace.SpawnLocation:Destroy()
    local b = Instance.new('SpawnLocation')
    b.Size = Vector3.new(12, 1, 12)
    b.Parent = workspace
    b.Name = 'NewSpawn'
    b.Anchored = true
    b.Position = Vector3.new(-6.59, 59.06, 61.51)
    b.Enabled = true
end)```

and i want to make it so when player dies his spawnlocation changes, but it dosent work
gentle radish
wooden palm
#

can someone see me publish?

stiff hearth
gentle radish
#

Nope.

stiff hearth
#

i mean i dont want everybody to respawn on the same place if somebody died once

#

i want a special person to do that

gentle radish
#

Then make a custom spawnpoint.

#

Don't use Roblox's SpawnPoint instance.

stiff hearth
#

huh?

#

wait i can actually disable and enable spawnpoints

#

should i just enable them on death or smth?

gentle radish
#

Well that would again have to be done on the server.

stiff hearth
#

e

#

h?

gentle radish
#

And then you still have the chance of two people spawning at the same spawnpoint

#

None of the spawning logic is handled on the client as far as I'm aware

#

All game logic should be on the server

#

It would be simpler to just make your own custom spawn system.

#

All that boils down to is teleporting a player's character to a position when their character is created (and loaded).

#

Then you can control exactly who spawns at what point

stiff hearth
#

sounds

#

crazy

#

and something i cant do

#

sob

kindred geyser
#

just make a part and teleport the player to it when they respawn