How can I make a script that opens a GUI when a part is clicked?

sure here’s my disco Angelo_#9886!

It says you have to add me. Typo#3149

Problem was solved through discord:
Script:

script.Parent.ClickDetector.MouseClick:Connect(function(player)
local NewUi = script.Parent:WaitForChild("UI NAME", 16):Clone()
NewUi.Parent = player:WaitForChild("PlayerGui", 24)
end)

and changing the screen GUI and guibase Enabled and Visible to true

4 Likes

What i would do is use client, Simply By Making A LocalScript And Putting It Inside the StarterPlayerScripts

And adding

local Part = workspace:FindFirstChild("Part name")

You can add a ClickDetecter Or Use This Line
local ClickDetector = Instance.new("ClickDetector", Part)

ClickDetector.MouseClick:Connect(function(Player)

Player.PlayerGui["Gui Name"].FrameName.Visible = true

end)

Hope this helps @MisterTypo

1 Like