Hey, I am Galactiq and I have been scripting for nearly four years now! I have encountered a problem with a bit of my code. Essentially, I am creating custom obby code. Whenever the player’s character loads, it is to teleport the player to the correct spawn point. However, this is not working. There is no error, either. I would appreciate any help or suggestions. Thanks!
My code:
Player.CharacterAdded:connect(function(Character)
wait()
Character:MoveTo(Stages:WaitForChild(tostring(_G.PlayerData[Player.UserId]["Stage"])).Position + Vector3.new(0,3,0))
SetCollisionGroupRecursive(Character)
Character.DescendantAdded:connect(SetCollisionGroup)
Character.DescendantRemoving:connect(ResetCollisionGroup)
Character:WaitForChild("Humanoid").Died:connect(function()
if InstantRespawn then
Player:LoadCharacter()
end
end)
end)
Okay but that is not the approach I am going for. I do not want to have to create a separate team object for each individual level. As of now, the place is just to test the mechanics of the game. However, if I were to apply it to like a 100 level obby, then there would be an overload of team objects. Which I do not exactly prefer.