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

How do I fix this script for IOS teleporting?

Asked by 10 years ago
function onClicked()
    if script.Parent.Parent.Parent.Parent.Character:FindFirstChild("Board") ~= nil then
        script.Parent.Parent.Parent.Parent.Character.Board:remove()
    end
    script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(171.677, 697.81, 471.344) 
end
script.Parent.MouseButton1Down:connect(onClicked)


any way you can help guys ?

0
Oh it is all on a surface GUi. KennyAtkins 0 — 10y

3 answers

Log in to vote
0
Answered by
Tesouro 407 Moderation Voter
10 years ago

Yeah, MouseButton1Down is for gui objects and handles, if you want a ClickDetector event, use MouseClick. (if you need more help)

Ad
Log in to vote
0
Answered by
NotSoNorm 777 Moderation Voter
10 years ago

e.e?

function Clicked()
    if script.Parent.Parent.Parent.Parent.Character:FindFirstChild("Board") ~= nil then
        script.Parent.Parent.Parent.Parent.Character.Board:remove()
    end
    script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(171.677, 697.81, 471.344) 
end
script.Parent.MouseButton1Down:connect(Clicked)
Log in to vote
0
Answered by 10 years ago
script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(171.677, 697.81, 471.344) 

try changing to

script.Parent.Parent.Parent.Parent.Character:MoveTo(171.677, 697.81, 471.344)

Answer this question