I am currently making a game that is a spot the difference prison escape game and I am using click teleports I have scripted.
The click teleport has a clickdetector with a range of 32 for the correct answer and the script is
function onClicked()
local c = game.Players:GetChildren()
for i = 1, #c do
c[i].Character.Torso.CFrame = CFrame.new(script.Parent.Parent.OnePartTele.Position)
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Because the brick for where it should teleport is name "OnePartTele" and it works. For the next stage I did the same thing a click detector with range of 32 and the same script but changed "OnePartTele" to "PartTwo" and the script is
function onClicked()
local c = game.Players:GetChildren()
for i = 1, #c do
c[i].Character.Torso.CFrame = CFrame.new(script.Parent.Parent.Part2.Position)
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
for the second teleport the script is not working,
Anyone know how I can fix this?

6 comments
Any errors?
You lied.
Also, you have no connection line at the end of the second script, did you copy it all or is that the problem?
I realized the difference so I fixed it and still noticed that it didnt work. @Satire and @Undeniable
So are there any errors and do either of them work?
@Undeniable there was an error in the 2nd script when I ran it with output window.