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 11 years ago
1function onClicked()
2    if script.Parent.Parent.Parent.Parent.Character:FindFirstChild("Board") ~= nil then
3        script.Parent.Parent.Parent.Parent.Character.Board:remove()
4    end
5    script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(171.677, 697.81, 471.344)
6end
7script.Parent.MouseButton1Down:connect(onClicked)

any way you can help guys ?

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

3 answers

Log in to vote
0
Answered by
Tesouro 407 Moderation Voter
11 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
11 years ago

e.e?

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

try changing to

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

Answer this question