local player = game.Players.LocalPlayer -- gets local player name in game.players
local localplayer = player.Character --finds local player in workspace
this is what I tried but it doesn't seem to work
for
loop to iterate through the players.for _, player in pairs(game:GetService("Players"):GetPlayers()) do local character = player.Character -- getting each character end
Hopefully this works for you.
local Player = game.Players.LocalPlayer local Character = workspace:WaitForChild(Player.Name) print(Character.Name)