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

My filtering enabled finder script will not work ??

if game.FilteringEnabled = true then print(Game is Filtering Enabled)

I'm kinda a big noob when it comes to scripting, I can do a little in LUA but not the advanced stuff. I tried to make that a script but since I don't know much about LUA, I can't edit it myself, and I need you guys to help me.

Best Regards, Nick

2 answers

You should use double == when you compare things in lua.

Also, FilteringEnabled isn't a property of game, it's a property of workspace, so it should look like so:

if workspace.FilteringEnabled == true then
	print("Game is FE")
end

It can also look like this:

if workspace.FilteringEnabled then
	print("Game is FE")
end

Or even like this, using inline tenary statements:

print("Game is",workspace.FilteringEnabled and "FE" or "nonFE")

The code should be as follows:

if game.FilteringEnabled then
	print ("Game is FilteringEnabled")
end

4 comments

0

thank you so much!

1

game.FilteringEnabled isn't a thing

1

FilteringEnabled is a property of Workspace.

0

Seemed fishy, but the guy had typed it down, so I didn't bother trying to research it.

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