I am trying to find a player (from workspace), and:
- I already made a string value in players
- do I use a local script or a normal script
Thanks for the Help!
I am trying to find a player (from workspace), and:
Thanks for the Help!
You can use :FindFirstChild() from either a Local Script or a regular Script to get the character with the corresponding name, but you can only make changes to them on the server with a regular Script (without going through filtering enabled). For example, from a regular Script,
--If you want the character from Workspace
local Char = game.Workspace:FindFirstChild(PlayerName)
Char:Destroy()
--If you want the player from Players
local Player = game.Players:FindFirstChild(PlayerName)
Player:Kick()
i'm not sure if you mean you need a script or what kind of script but im just going by what i think you mean it needs a local script
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
I actually need the player name from the "Players" file
Then you would do the same thing, except instead of game.Workspace:FindFirstChild(PlayerName), do game.Players:FindFirstChild(PlayerName). You can then do something like Player:Kick()
what if I wanted to find a one player out of two players?