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