I'm trying to change a string value to the players name that touches a certain part?
(03:12:02.299 - Workspace.Arenas.Arena1.CoreParts.Pad1.Script:8: bad argument #3 to 'Value' (string expected, got Object))
script.Parent.Touched:connect(function(HumanPart) wait(0.1) local h = HumanPart.Parent:FindFirstChild("Humanoid") if h then if script.Parent.PlayerReady.Value == 1 then print("Player On") script.Parent.BrickColor = BrickColor.new("Bright red") script.Parent.PlayerNameOne.Value = h.Parent script.Parent.PlayerReady.Value = 2 end end end)
I'm just going to ignore how your script violates so many practices, and just give you the answer:
on Line 08
, change that to
script.Parent.PlayerNameOne.Value = h.Parent.Name
Because you're trying to set the value of something to an object when in reality it has to be the NAME of the object.