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?
I opened output and saw that the teleporter was looking for a brick in a model so I ungrouped the model it was looking for.