Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I need help with this problem?

Asked by 10 years ago

How do you create a script that when a part is clicked it pops up a ScreenGui any ways how?

3 answers

Log in to vote
1
Answered by 10 years ago
script.Parent = Instance.new("ClickDetector")
script.Parent.ClickDetector.MouseClick:connect(function()
    game.Players:WaitForChild("PlayerGui").ScreenGui.TextBox.Visible = true
end)
Ad
Log in to vote
0
Answered by 10 years ago

You can use ClickDetector and put it in the part so that you can make a function, go to this for more information : http://wiki.roblox.com/index.php?title=Making_an_onClicked_script

Log in to vote
0
Answered by 10 years ago

You could just put a SurfaceGui into the part, put a TextButton in the part, change the textures and all that, then put a script in the TextButton with this code:

function onClick()
    game.StarterGui.ScreenGui.Enabled = true -- Change the ScreenGui to whatever the Gui is called
end

script.Parent.MouseButton1Click:connect(onClick)

Make everything within the screengui is visible, then just untick the enabled box in the screengui properties

Make sure to Accept my answer if it worked for you. Please comment back if it is not working and I'll help you out.

Make sure to check out my youtube channel for some ROBLOX tutorials and gameplay videos: Youtube

0
enable box you mean visible? or achivable Revenant101 25 — 10y
0
and it dosent work when i cliked the part nothing happens Revenant101 25 — 10y

Answer this question