local player = game.Players.LocalPlayer.Name --Find Player name
local nameofplayer = game.Workspace:FindFirstChild(player) --Get the player in workspace
if script.Toggled.Value == 1 then
print(nameofplayer)
end
Error (Line 2): Argument 1 missing or nil

2 comments
You can get a Player's Character by the 'Character' property of a Player ( Player.Character ). :)
Can I have an example? Or a revision to my original script?