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

? is not a valid member of Folder

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)

3 comments

0

That means that the int value called "FullValue1" isnt created?

0

It already is created, in another script. FullValue1 gets the full name of the IntValue.

0

May I ask why you're indexing a variable?

1 answer

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

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