I want to check every time a player spawns in the game and then teleport them to their "campsite".
The code I have right now is this:
game.Workspace.ChildAdded:connect(function(child)
if game.Players:GetPlayerFromCharacter(child) then
player = game.Players:GetPlayerFromCharacter(child)
if workspace:findFirstChild("Home"..player.Name) then
x = workspace:findFirstChild("Home"..player.Name)
player.Character.Torso.CFrame = CFrame.new(Vector3.new(x.Home.spawnbrick.Position))
end
end
end)
Output is returning no errors, and I can't find any either.
Can someone please kindly help?

2 comments
It did not work.
"should" lol Anyways the idea is just to check every time the character is changed, it executes the teleport to the home brick.