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

Thing happens when a value is over 250000?

So i'm trying to make a game where you collect things and a value increases. However, how do I make something happen when the value is more than 250,000?

if workspace.MoneyValue.Value = >250000 then
	workspace.scriptconfirmationsound:Play()
	
end

pls help im new to scripting

3 comments

0

What kind of thing u want to happen? A sound?

0

nah thats just to confirm if it works or not

0

???

1 answer

✓ Accepted answer
workspace.MoneyValue:GetPropertyChangedSignal("Value"):Connect(frunction()
	if workspace.MoneyValue.Value >= 250000 then
		print("YAY, 250,000")
	end
end)

4 comments

0

Is this a localscript or localscript, or needs to put somewhere?

0

y

0

bruh you misspelled function

0

Changed on value objects already only detects changes in Value.

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