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

Help! Frame is not valid member of ScreenGui?

I'm trying to create a shop system with FE enabled and here are my scripts.

This script is in my ServerScriptService and I'm trying to use it as a bridge to the ROBLOX server to the player client.

local debounce = false
game.Workspace.Enter.Touched:Connect(function(hit)
	if not debounce then
		debounce = true
	if game.Players:GetPlayerFromCharacter(hit.Parent) then
		game.ReplicatedStorage.ShowShopGui1:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent))
	end
	wait(2)
	debounce = false
	end
end)

This is my second Script which goes into my GUI that is meant to show the GUI.

game.ReplicatedStorage.ShowShopGui1.OnClientEvent:Connect(function()
	script.Parent.Frame.Visible = not script.Parent.Frame.Visible
end)

I'm sure it would also be helpful if I add the branch for the GUI, which looks like this:

WeaponShop1

LocalScript

Holder (Frame used for my GUI)

1 answer

✓ Accepted answer

If it says that it didn't find the frame then check if variables are made right, script is good but it can't find the frame so check its location again.

1 comment

0

Thank you! Definitely helped a lot. I guess I glossed over a couple things while making the script and forgot that the "Frame" was different than my actual Frame name.

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