So I want the player to be able to click a ScreenGui's TextButton and respawn the player without actually killing them
local name = game.Players.LocalPlayer --Get their name.
TextButton.MouseButton1Click:connect(function()
if game.Players:FindFirstChild(name) then --Is there a player with that name?
game.Players:FindFirstChild(name):LoadCharacter()
end
end)
This is confusing me, i've been looking at sources the past literal 3 hours watching the RT podcast on my other monitor, and I cannot figure this out, I've looked all around and altered this and many others scripts.
This is how it's ordered if it helps | StarterGui ScreenGui TextButton LocalScript

1 comment
You can't use LoadCharacter in a local script