Hi for some reason I can't find anything about this but how would I do this?
game.Players.Player.Name
Player.Name would be the directory inside the directory. Also, I have the
local Player = game.Players.LocalPlayer
As the variable.
Hi for some reason I can't find anything about this but how would I do this?
game.Players.Player.Name
Player.Name would be the directory inside the directory. Also, I have the
local Player = game.Players.LocalPlayer
As the variable.
if you do Player.Name it looks for it's property called Name, use FindFirstChild, it will look for children of the directory only:
game.Players.Player:FindFirstChild('Name')
Or am i missing something?
Well, how I am doing it I have a list of all the players as a bool value. And I want to filter it out with just the one player who is affected.
local Players = game.Players:GetPlayers()
local nplrs = #Players
local Randomplayer = nil
if nplrs > 0 then
Randomplayer = Players[math.random(1, nplrs)]
--Do your function here
end
Hope This Helped :D
Not really but I was able to make it work.
oh ok
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
What exactly are you trying to do? What is the goal of your code?
I think he trying to randomly get a player out of Players, and affect them.