i am trying to find the player in the workspace but it only works in local scripts. can you help me try to locate it regular scripts.
Failing code in regular script
local player = game.Players.LocalPlayer.Name --Find Player name
local nameofplayer = game.Workspace:FindFirstChild(player) --Get the player in workspace
script.Parent.MouseButton1Click:Connect(function()
nameofplayer.Head.BrickColor = BrickColor3.Blue()

4 comments
methods may differ for finding the local player in a server script. Can you please provide some code to work with, or an explanation
Done
Player.Character is the legitimate method... The LocalPlayer is only attributed to Client Instances, so of course the Server is incapable of reference an Object of it's kind.
Whenever i use that in the script it responds with "attempt to index nil with 'Character'"