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

? is not a valid member of Folder

Asked by
DogeIXX 172
5 years ago

Hey there, I want to edit the value of an IntValue, that got created via other script. But everytime I try to open this script, "FullValue1 is not a valid member of Folder" shows up.

This is my code:

script.Parent.MouseButton1Click:Connect(function()
    local Players = game:GetService("Players")
local player = Players.LocalPlayer  
local path = game.Workspace.GameData.Player 
local GetName = player.Name
local FullValue1 = GetName .. "IsInGame"
print(FullValue1)
local fvalue = workspace.RealPath.Value 

        if script.Parent.Text == "Enter Game" then
            local sss = game.Workspace.GameData.Player.FullValue1.Value
            print(sss)
            game.Workspace.GameData.Player.FullValue1.Value = "out"
            game.StarterGui.ingui.Frame.Visible = false
            script.Parent.Text = "Exit Game"
        else
            fvalue = "in"
            game.StarterGui.ingui.Frame.Visible = true
            script.Parent.Text = "Exit Game"
        end
    end)

0
That means that the int value called "FullValue1" isnt created? NubScripters 126 — 5y
0
It already is created, in another script. FullValue1 gets the full name of the IntValue. DogeIXX 172 — 5y
0
May I ask why you're indexing a variable? DeceptiveCaster 3761 — 5y

1 answer

Log in to vote
0
Answered by
DogeIXX 172
5 years ago

Okay, my problem is solved.

The solution is from aipiox123, I am writing this in my own sentences.

Replace

game.Workspace.GameData.Player.FullValue1.Value = "out"

with

game.Workspace.GameData.Players:WaitForChild("FullValue1").Value = "out"

Also make sure to use a StringValue. (That was an error for me too, I used IntValue.)

Ad

Answer this question