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

i am extremely confused as for why it says its not a member?

game.Players.LocalPlayer.data.modeactive = 1

its just supposed to set the value of modeactive to 1.

but its giving me a error that says

modeactive is not a valid member of intvalue.

and it is a intvalue and its in data. im confused..

2 comments

0

game.Players.LocalPlayer.data.modeactive.Value = 1

1

Use a code block

1 answer

It's possible the object you are searching for has not loaded into the game yet, causing it to not be found.

local data = game.Players.LocalPlayer:WaitForChild("data")
local modeActive = data:WaitForChild("modeactive")

And now your modeActive variable would be precisely what you seek, but we're not done yet.

You say it is an intValue, and I assume you want to change the Value of this intValue, to do so you must directly access the property, like so.

modeActive.Value = 1

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