I have been trying to make a Script where you can link yourself to a statue and when you'll die you'll respawn there but in the died event the CurrentPhoenixPos Value after the 2nd time it's triggered the print legit doesn't print anything.
repeat wait() until game.Players.LocalPlayer.Character
local phoenixEvent = game.ReplicatedStorage:WaitForChild("phoenixEvent")
local player = game.Players.LocalPlayer
local char = player.Character
local hum = char:WaitForChild("Humanoid")
currentPhoenixPos = script:WaitForChild("CurrentPhoenixPos")
phoenixEvent.OnClientEvent:Connect(function(posPart)
currentPhoenixPos.Value = posPart.CFrame
end)
hum.Died:Connect(function()
player.CharacterAdded:Wait()
wait(0.1)
repeat wait() until player.Character.HumanoidRootPart
local char = player.Character
print(currentPhoenixPos)
char:SetPrimaryPartCFrame(currentPhoenixPos.Value)
end)
