|
| 16 Nov 2017 06:38 AM |
I'm trying to make a gui appear when I touch a brick but it isn't working, here's my script: function onTouch() game.StarterGui.ScreenGui.Frame.Visible = true end script.Parent.Touched:connect(onTouch) |
|
|
| Report Abuse |
|
|
| |
|
Flinnman
|
  |
| Joined: 07 Sep 2014 |
| Total Posts: 68 |
|
|
| 16 Nov 2017 06:51 AM |
| Script works, it probably just doesn't work in roblox studio server. |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2017 06:51 AM |
| I was trying to find out how to do the same thing |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2017 06:54 AM |
| the script doesn't work in-game or even when i put it in a different place. |
|
|
| Report Abuse |
|
|
Flinnman
|
  |
| Joined: 07 Sep 2014 |
| Total Posts: 68 |
|
|
| 16 Nov 2017 07:02 AM |
| It turns the frame visible if u check the properties. Use other gui like text and see if it works. |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2017 07:09 AM |
| I tried altering the script to make the imagelabel and textbutton visible too but it still won't work, I don't understand why it's so hard to make an ontouch script open a gui. |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2017 07:15 AM |
Make it into a localscript.
bad choice |
|
|
| Report Abuse |
|
|
| |
|
|
| 16 Nov 2017 07:17 AM |
function onTouch(part) if part.Parent:FindFirstChild("Humanoid") then local player = game.Players:GetPlayerFromCharacter(part.Parent) player.PlayerGui.ScreenGui.Frame.Visible = true end end
script.Parent.Touched:Connect(onTouch) |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2017 07:21 AM |
| Thank you so much! It worked! |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2017 07:53 AM |
| Would you also happen to know how to make a gui pop up using a click detector? |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2017 08:26 AM |
| You'll use click detector for that |
|
|
| Report Abuse |
|
|
| |
|
|
| 16 Nov 2017 02:42 PM |
function onClick(player) player.PlayerGui.ScreenGui.Frame.Visible = true end
script.Parent.ClickDetector.MouseClick:Connect(onClick)
Put a ClickDetector in the script's parent |
|
|
| Report Abuse |
|
|
| |
|