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)

2 comments
If my answer helped then it would be great if you could upvote/accept it!
Won't line 4 pass as true even if h is nil? Don't you need if h~= nil then?