Everything you need while building your games. Open in a second tab or hit print to keep it next to the computer.
game:GetService("Name") at the top of your script — it's more reliable than game.ServiceName.PlayerAdded runs before any script tries to read leaderstats. Use player:WaitForChild("leaderstats") in LocalScripts instead of accessing it directly.GetPlayerFromCharacter returned nil — the thing that touched the part wasn't a player.if not player then return end right after calling GetPlayerFromCharacter. This guards against bullets, NPCs or other parts firing the Touched event."leaderstats" vs "LeaderStats".:WaitForChild() instead of a direct .Name access if the item is created at runtime. Remember names are case-sensitive.while true do loop must have a task.wait() inside it. Without a wait, Roblox kills the script after a few seconds. Add task.wait(0.1) at the bottom of the loop.PlayerRemoving), not every time a value changes. Wrap all DataStore calls in pcall so a throttle error doesn't crash your script.StarterPlayerScripts. If you need it to run when the character spawns, put it in StarterCharacterScripts instead.humanoid:MoveTo() needs a Vector3, not a Part. Use part.Position to get the Vector3 out of a part.