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: Problem?

Previous Thread :: Next Thread 
LOBOT44 is not online. LOBOT44
Joined: 03 Feb 2010
Total Posts: 23539
17 Jan 2012 07:25 PM
function onTouched(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local gui = game.Players.LocalPlayer.PlayerGui:FindFirstChild("Backpack")
if gui then
gui.Quest.Visible = true
end
end
end
script.Parent.Touched:connect(onTouched)


doesnt work?
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
17 Jan 2012 07:28 PM
Why didn't you use my anonymous functions? Well.

Make sure to put in a local script like I told you.

script.Parent.Touched:connect(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if game.Players.LocalPlayer.PlayerGui:FindFirstChild("Backpack") then
gui.Quest.Visible = true
end
end
end)
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
17 Jan 2012 07:29 PM
Oops.

script.Parent.Touched:connect(hit)
if hit.Parent:FindFirstChild("Humanoid") then
gui = game.Players.LocalPlayer.PlayerGui:FindFirstChild("Backpack")
if gui then
gui.Quest.Visible = true
end
end
end)
Report Abuse
blueymaddog is not online. blueymaddog
Joined: 23 Sep 2009
Total Posts: 5459
17 Jan 2012 07:31 PM
fixed, also this script only works in a local script:
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local gui = game.Players.LocalPlayer.PlayerGui:FindFirstChild("Backpack")
if gui then
gui.Quest.Visible = true
end
end
end)
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
17 Jan 2012 07:32 PM
@Blue, Yes I forgot my function. D:
Report Abuse
blueymaddog is not online. blueymaddog
Joined: 23 Sep 2009
Total Posts: 5459
17 Jan 2012 07:38 PM
why over complicate things, try to make it as similar as you can to their script

unless it horribly inefficient
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
17 Jan 2012 07:40 PM
Oh, that is actually my script in the beginning, he just ripped the middle into a regular function...
Report Abuse
LOBOT44 is not online. LOBOT44
Joined: 03 Feb 2010
Total Posts: 23539
17 Jan 2012 07:42 PM
nope.
I Use the term gui alot in guis.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
17 Jan 2012 07:45 PM
@LO Oh, that was someonelse then; but it looked extremely similar. :O
Report Abuse
blueymaddog is not online. blueymaddog
Joined: 23 Sep 2009
Total Posts: 5459
17 Jan 2012 07:46 PM
same here. you can tell if it's my script because it's got local variables written all over it >:)

and you can teel if it's oysi because he localizes everything (just about) including functions from librarys :P
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
17 Jan 2012 07:47 PM
@Blue Cool. But my script that I posted for that one guy had exactly the same inner coding. From the humanoid to the gui =. :/
Report Abuse
blueymaddog is not online. blueymaddog
Joined: 23 Sep 2009
Total Posts: 5459
17 Jan 2012 09:01 PM
it looks similar to mine too, every one has different coding syles and some are similar :P (mostly because people copy the formating of better scripters than themselves lol)
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