Most basic of scripts not working

In a localscript, I have this line of code:

task.wait(10)

while true do
	script.Parent.Value = game.Players.LocalPlayer.Character
	task.wait(5)
end

Quite simply, the value is not setting upon testing in 2 player mode.

What can I do to fix this?

Ok uh why are you setting a value to a players character? Can you give some context of what the script is trying to do

Iā€™m using it to give stuff between players in a gui. Also because functions that call the player tend to be pretty unreliable.

localscripts dont run in the workspace make sure to put your script in
replicatedfirst
or
startergui
or
starterplayer
or
startercharacter

2 Likes

Well congrats, not only did you figure out the solution to this issue but rather the solution to another issue I had with the bins.