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

Can anyone fix my script that gives tools to players?

Asked by 4 years ago

https://imgur.com/a/Bc8t8Xm

Please note these things that aren't shown in the image

contestants = (game.Players:GetPlayers())

beast = contestants[math.random(1,#contestants)]

1 answer

Log in to vote
0
Answered by 4 years ago

What I saw right off the bat is that you're checking if 'beast' exists, not if it's the same player. Since it's players (and no 2 players have the same name), you can compare the names in your loop. You can also compare the instance (i.e. if beast == player). Tht way, it checks if the player is the 'beast', not if the beast actually exists in players.

0
This fixed it!! Thank you so much!! DevSpyChicken 8 — 4y
Ad

Answer this question