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

Why doesn't this work?

Simple and small.

while true do
	wait(3)	
	if script.Parent.Parent.Time.MapVoting.Done == true then -- I removed this and the script worked fine...
	
		script.Parent.ImageOne.Bool.Value = 0
		script.Parent.ImageTwo.Bool.Value = 0
	end
end

I've tried re-writing it. It DOES NOT WORK. script.parent.Parent.Time.MapVoting.Done will equal true at one point for 5 seconds, therefore this should run.



	while script.Parent.Parent.Time.MapVoting.Done == true do
	
		script.Parent.One.Test.Value = 0
		script.Parent.Two.Test.Value = 0
	end

Also tried that.

1 answer

✓ Accepted answer

What type of object is "Done"?

script.Parent.Parent.Time.MapVoting.Done

Since it's not a property, it must be an object. And if you're checking if an object is equal to true, that's going to return false every time.

If Done is an IntValue object, you need to use the Value property.

while script.Parent.Parent.Time.MapVoting.Done.Value == true do

2 comments

0

Done is a BoolValue. I'll tinker around since I have an early start to code.

1

OH WOW. That small mistake? I guess I was so tired I didn't even notice it. Anyway, thanks. Yes, it works now.

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