Studio shows this error, but there is no error in the code

I have this thing called “Modifier Accounts” in my game and for certain parts of the game like buttons and other scripts, those need to know whether the user is one of those, or not. So, I’m trying to add a BoolValue to the player when they join and then later on, a different script checks for the bool and if it returns true, it does something otherwise it doesn’t and stuff. The problem is, Roblox Studio gives me the following error when I run the game:


Here’s code:

game.Players.PlayerAdded:Connect(function(plr)
	local isAModifierAccount = Instance.new("BoolValue")
	isAModifierAccount = false
	isAModifierAccount.Parent = plr
	isAModifierAccount.Name = "IsAModifierAccount"
end)

Any help is highly appreciated as I’m trying to get this update out as fast as possible and this is the last thing I need to add.

1 Like

BooleanValues are like regular values, you have to set the value. The correct version should be isAModifierAccount.Value = false

1 Like

OHHHH, RIGHT!!! THANKS A LOT. youre a lifesaver man :slight_smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.