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

the output would i always result to "0 is not a member of folder"?

Whenever i execute this script it would always say "0 is not a member of folder" in the output.

if CurrentItem > 4 then
	CurrentItem = 1
end

2 comments

0

You cannot directly compare an object with an integer. If CurrentItem is a number, you need to give a lot more context and code.

0

What is CurrentItem, give full script, define CurrentItem, try CurrentItem.Value

1 answer

If CurrentItem variable is a value, then try to do:

if CurrentItem.Value > 4 then
    CurrentItem.Value = 1
end

but if it's something else than a value, you should find a variable or an IntValue assigned to the CurrentItem var. and do CurrentItem.IntValue.Value instead of CurrentItem.Value in the code up there.

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