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

Why is this happening?

I have a localscript that sets a value inside a Frame to "true." The localscript is inside a tool. Here's the code:

function unSelected(mouse)
	game.Players.LocalPlayer.PlayerGui.bow.Frame.Value.Value = true
end

script.Parent.Unequipped:connect(unSelected)

The problem is that the output always reads "Value is not a valid member of Frame," even if Value isn't nil. Putting something like this:

value = game.Players.LocalPlayer.PlayerGui.bow.Frame:WaitForChild("Value")
function unSelected(mouse)
	game.Players.LocalPlayer.PlayerGui.bow.Frame.Value.Value = true
end

script.Parent.Unequipped:connect(unSelected)

doesn't have any output, but the script does nothing at all. It doesn't change the value. Can anybody explain why this is happening?

1 answer

It's waiting for something that doesn't exist.

1 comment

0

You don't know what :WaitForChild() means, do you?

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