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

How come this local script does not make a frame appear when clicked?

script.Parent.MouseButton1Click:Connect(function()
	game.StarterGui.WhichGive.BACKVIII.Visible = true
end)

BACKVIII is the Frame I wanted the script to make visible.

2 answers

✓ Accepted answer

The problem is that you put StarterGui instead of the PlayerGui

Fixed code here:

local player = game.Players.LocalPlayer
local playerGui = player:FindFirstChild("PlayerGui")

script.Parent.MouseButton1Click:Connect(function()
    playerGui.WhichGive.BACKVIII.Visible = true
end)

also make sure this is in a localscript

1 comment

0

cool now i just need to figure out how to make the frame invisible aftrer clicking again

There's something weird going on with your brackets

3 comments

0

What do you mean?

0

when you wrote: (function()

0

It is supposed to be that way Pigred72.

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