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