Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 6 years ago

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..

0
game.Players.LocalPlayer.data.modeactive.Value = 1 Amiaa16 3227 — 6y
1
Use a code block Crazycat4360 115 — 6y

1 answer

Log in to vote
0
Answered by
theCJarmy7 1293 Moderation Voter
6 years ago

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
Ad

Answer this question