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 » Scripting Helpers
Home Search
 

Re: Open Gui button

Previous Thread :: Next Thread 
Tesouro is not online. Tesouro
Joined: 19 Dec 2010
Total Posts: 1284
06 Oct 2011 01:31 PM
i need a script that when i touch a brick, it opens a Gui
Help!
Report Abuse
werty1237 is not online. werty1237
Joined: 07 Jul 2010
Total Posts: 72
06 Oct 2011 01:39 PM

local debounce = false



function getPlayer(humanoid)

local players = game.Players:children()

for i = 1, #players do

if players[i].Character.Humanoid == humanoid then return players[i] end

end

return nil

end



function onTouch(part)



local human = part.Parent:findFirstChild("Humanoid")

if (human ~= nil) and debounce == false then



debounce = true



local player = getPlayer(human)



if (player == nil) then return end



user = game.Players:findFirstChild(human.Parent.Name)


script.Parent.NAME OF GUI:clone().Parent = player.PlayerGui

wait(2)

else

wait(2)

debounce = false

end

end





script.Parent.Touched:connect(onTouch)



All you need to do is put this in the brick in a script with the gui INSIDE of the brick.


Do not use below
B00M
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
06 Oct 2011 01:52 PM
@werty Learn to make readable code.
Report Abuse
juriaan is not online. juriaan
Joined: 25 Nov 2008
Total Posts: 939
06 Oct 2011 01:55 PM
@Werty. learn to make your Own Scripts..

Report Abuse
werty1237 is not online. werty1237
Joined: 07 Jul 2010
Total Posts: 72
06 Oct 2011 02:04 PM
@juriaan I've tried to learn and I get them but I can't make them
Report Abuse
buddy249950 is not online. buddy249950
Joined: 30 Jun 2016
Total Posts: 3536
06 Oct 2011 02:59 PM
Don't help people with free models...
Report Abuse
Cachinnation is not online. Cachinnation
Joined: 21 Aug 2011
Total Posts: 1797
06 Oct 2011 03:04 PM
cow =
kow = game:findFirstChild(tostring(cow), true)
gui =

kow.Touched:connect(function(s)
k = game.Players:playerFromCharacter(s.Parent)
if k.Humanoid then
if k.PlayerGui[gui] then
k.PlayerGui[gui].Visible = true
end
end
end)
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
06 Oct 2011 03:20 PM
No requests allowed!!!! xDDD
Report Abuse
Tesouro is not online. Tesouro
Joined: 19 Dec 2010
Total Posts: 1284
06 Oct 2011 06:22 PM
guys, if u arent here to help, dont post comments
If theres a scripting Forum, its to be used and to experienced ppl help others
Report Abuse
Cachinnation is not online. Cachinnation
Joined: 21 Aug 2011
Total Posts: 1797
06 Oct 2011 06:25 PM
Well, making scripts for other people who have no idea how to script doesn't do anything.
Report Abuse
Tesouro is not online. Tesouro
Joined: 19 Dec 2010
Total Posts: 1284
06 Oct 2011 07:00 PM
i have a basic knowing about scripts, but i need help to make them
Report Abuse
Tesouro is not online. Tesouro
Joined: 19 Dec 2010
Total Posts: 1284
06 Oct 2011 07:01 PM
ah, and i know how to search free models, ok?
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
07 Oct 2011 04:32 PM
So search it and learn it! WHATTA A RYTHME XDDD
Report Abuse
Tesouro is not online. Tesouro
Joined: 19 Dec 2010
Total Posts: 1284
09 Oct 2011 09:47 AM
...
Report Abuse
CaptainLoony95 is not online. CaptainLoony95
Joined: 20 Feb 2009
Total Posts: 4852
09 Oct 2011 10:09 AM
function ontouched(hit)
if (hit.Parent:findFirstChild("Humanoid")~=nil) then
game.Players:findFirstChild(hit.Parent.Name).PlayerGui.gui.gui2.Visible = true
end end
script.Parent.Touched.connect(ontouched)
Report Abuse
DXPower is not online. DXPower
Joined: 21 Oct 2008
Total Posts: 2866
09 Oct 2011 10:30 AM
put an invisabe GUI in starter gui

use the argument hit to locate the character

find the gui in starter gui

have it change the visibilty

go in my models

take the onTouch GUI
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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