Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Argument 1 missing or nil what did I do wrong How do I fix it?

I am making a textlable to red when a intvalue is less than 800

--values
local TextNum = script.Parent.NumBlocks
local Rating = script.Parent.Rating
local ValueBox = game.ReplicatedStorage:WaitForChild()
--If statement
if ValueBox < 800 then
	Rating.BackgroundColor3 = Color3.fromRGB(177, 0, 0)
end

and you must know that the IntValue was created from serverscript service so I did instance.new("IntValue"). I have to use the same value so I did wait for child but it is not correct. How do I fix this? Thanks

1 answer

✓ Accepted answer
--values
local TextNum = script.Parent.NumBlocks
local Rating = script.Parent.Rating
local ValueBox = game.ReplicatedStorage:WaitForChild()
--If statement
if ValueBox < 800 then
    Rating.BackgroundColor3 = Color3.fromRGB(177, 0, 0)
end

Local value box is missing an argument in waitforchild script is waiting for nothing

2 comments

0

How would write it if I add the value inside the parenthesis it just turns red?

0

Thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.