So I have a working Teleport GUI, Or at least It works in studio.
It makes a ParticleEmitter Appear in the Character's Torso, then teleport them to a shop area.
When I tried it out in Play Mode, it Didn't working saying that the character was nil
The obvious Solution was to put :WaitForChild("Character") And let it do it after the character loads.
But the problem is, the character loads all of its clothes and hats and faces and everything, but it still doesn't let me teleport.
I think the problem is I have the wrong way to get the character from player, but I don't know...
Here's the Localscript that teleports you on click:
character = game.Players.LocalPlayer:WaitForChild("Character") Sparkles = Instance.new("ParticleEmitter") script.Parent.MouseButton1Down:connect(function(bloop) Sparkles.Rate = 50 Sparkles.Parent = character.Torso wait(3) character.Torso.CFrame = CFrame.new(Vector3.new(-6195.655, -244.6, -103.183)) Sparkles.Enabled = false end)
character = game.Players.LocalPlayer:WaitForChild("Character")
That's waiting for a child of the player called Character, not the actual character. That's why. You want to either use player.CharacterAdded
which returns the character, or do something like game.Workspace:WaitForChild(game.Playres.LocalPlayer.Name)