generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Game Design
Home Search
 

Re: How do I make a gui appear when I touch a brick?

Previous Thread :: Next Thread 
TheGuyDudeDude is not online. TheGuyDudeDude
Joined: 17 Feb 2014
Total Posts: 1543
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
TheGuyDudeDude is not online. TheGuyDudeDude
Joined: 17 Feb 2014
Total Posts: 1543
16 Nov 2017 06:50 AM
bump
Report Abuse
Flinnman is online. 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
millakai1236573 is online. millakai1236573
Joined: 28 Jul 2015
Total Posts: 191
16 Nov 2017 06:51 AM
I was trying to find out how to do the same thing
Report Abuse
TheGuyDudeDude is not online. TheGuyDudeDude
Joined: 17 Feb 2014
Total Posts: 1543
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 is online. 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
TheGuyDudeDude is not online. TheGuyDudeDude
Joined: 17 Feb 2014
Total Posts: 1543
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
Happyronic is not online. Happyronic
Joined: 30 Jul 2013
Total Posts: 33
16 Nov 2017 07:15 AM
Make it into a localscript.


bad choice
Report Abuse
TheGuyDudeDude is not online. TheGuyDudeDude
Joined: 17 Feb 2014
Total Posts: 1543
16 Nov 2017 07:16 AM
Didn't work.
Report Abuse
cowsoncows is not online. cowsoncows
Joined: 11 Oct 2013
Total Posts: 2522
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
TheGuyDudeDude is not online. TheGuyDudeDude
Joined: 17 Feb 2014
Total Posts: 1543
16 Nov 2017 07:21 AM
Thank you so much! It worked!
Report Abuse
TheGuyDudeDude is not online. TheGuyDudeDude
Joined: 17 Feb 2014
Total Posts: 1543
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
rcepiczkad is not online. rcepiczkad
Joined: 24 Apr 2014
Total Posts: 6822
16 Nov 2017 08:26 AM
You'll use click detector for that
Report Abuse
TheGuyDudeDude is not online. TheGuyDudeDude
Joined: 17 Feb 2014
Total Posts: 1543
16 Nov 2017 08:34 AM
you don't say
Report Abuse
cowsoncows is not online. cowsoncows
Joined: 11 Oct 2013
Total Posts: 2522
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
TheGuyDudeDude is not online. TheGuyDudeDude
Joined: 17 Feb 2014
Total Posts: 1543
16 Nov 2017 10:14 PM
Thanks again!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image