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
9 years ago
function Click(mouse)
script.Parent.Parent.Parent.Parent.Parent.CharacterAppearance =
"http://www.roblox.com/Asset/CharacterFetch.ashx?userId=13645"
script.Parent.Parent.Parent.Parent.Parent.Character.Position(240.2, 0.5, -246.4)
end

script.Parent.MouseButton1Down:connect(Click)

1 answer

Log in to vote
1
Answered by 9 years ago

Use this instead :)

local plr = game.Players.LocalPlayer
local button = script.Parent
local appearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=13645"
local teleportLocation = Vector3.new(240.2, 0.5, -246.4)


function Click()
    plr.CharacterAppearance = appearance
    plr.Torso.CFrame = CFrame.new(teleportLocation)
end



button.MouseButton1Down:connect(Click)

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

Ad

Answer this question