Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I teleport the character after they change their appearance?

Asked by
Akozta 40
10 years ago
1function Click(mouse)
2script.Parent.Parent.Parent.Parent.Parent.CharacterAppearance =
4script.Parent.Parent.Parent.Parent.Parent.Character.Position(240.2, 0.5, -246.4)
5end
6 
7script.Parent.MouseButton1Down:connect(Click)

1 answer

Log in to vote
1
Answered by 10 years ago

Use this instead :)

01local plr = game.Players.LocalPlayer
02local button = script.Parent
04local teleportLocation = Vector3.new(240.2, 0.5, -246.4)
05 
06 
07function Click()
08    plr.CharacterAppearance = appearance
09    plr.Torso.CFrame = CFrame.new(teleportLocation)
10end
11 
12 
13 
14button.MouseButton1Down:connect(Click)

And make sure it's a LocalScript instead of a Script

Ad

Answer this question