In a game I'm creating I need to know the basics to selecting a player to attack. Like survival 303, when you click on a player, with your sword it damages them. What part in there, and make it so an animation will play, showing the player swinging their sword, yet the player has damaged the target?
COMMUNITY QUESTION
Selecting a player?
1 answer
wait(2) --Bugs if you don't wait
local players = game.Players:GetPlayers()
local randomplayer = players[math.random(1, #players)]
print(randomplayer.Name)
This discussion is preserved as it was. New answers, comments, and votes are closed.
