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

How do i stop click teleport from teleporting everyone in the game?

Asked by 5 years ago
Edited 5 years ago

!Screenshot I'm using a click teleport script just because it more accurate than a touch teleport-er but I've ran into a problem. Everyone in the game gets teleported instead of just the player that clicked. I've tried many things to fix this but nothing so far has worked, can anyone give me some insight to what i should do?

0
image failed to load at least for me vissequ 105 — 5y
0
Image failed to load for some reason. BenjySmb 16 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

It's obviously because you are iterating through all the players by using game.Players:GetChildren(). MouseClick passes one parameter, which is the player that clicked on the ClickDetector. If you use that parameter and not the entire load of players in-game, it should fix your problem.

0
Thanks. maxbthecool3 6 — 5y
Ad

Answer this question