Scripting support

i wrote a script for test, here it is:

if game.ServerStorage.value1 == 1 then
	print('Yes!')
else
	print('No!')
end

value is 1, but it always print ‘No!’. how to fix that? i tried changing value, still output is ‘No!’

You forgot to get the Value property

if game.ServerStorage.value1.Value == 1 then
	print('Yes!')
else
	print('No!')
end
1 Like

it should be

if game.ServerStorage.value1.Value == 1 then

because you’re trying to check the value of the object, while you are checking if the object equals to number 1, which it doesn’t

ohhh, i forgot that, thank you!!

1 Like

thank you too for helping me!!