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
 

[ Content Deleted ]

Previous Thread :: Next Thread 
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
16 May 2014 10:34 PM
[ Content Deleted ]
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 May 2014 10:34 PM
It's not debounce's fault, it's the scripter's fault.
Can you post that section here?
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
16 May 2014 10:34 PM
[ Content Deleted ]
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 May 2014 10:37 PM
debounce = false
script.Parent.Touched:connect(function(hit)
plr = hit.Parent
hum = plr:FindFirstChild("Humanoid")
if (hum~=nil) then
debounce = true
plr.PlayerGui.Shop.Frame.Visible = false
wait(1)
debounce = false
end
end)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 May 2014 10:37 PM
But plr.PlayerGui is not going to exist since you are referencing the character.

local plr = Game.Players:GetPlayerFromCharacter(hit.Parent);
local hum = script.Parent:FindFirstChild("Humanoid");
Report Abuse
Megadragon2469 is not online. Megadragon2469
Joined: 23 May 2009
Total Posts: 14655
16 May 2014 10:38 PM
But that script makes your gui disappear
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
16 May 2014 10:40 PM
[ Content Deleted ]
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
16 May 2014 10:41 PM
[ Content Deleted ]
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 May 2014 10:42 PM
debounce = false
script.Parent.Touched:connect(function(hit)
if debounce then return end
plr = hit.Parent
hum = plr:FindFirstChild("Humanoid")
if (hum~=nil) then
debounce = true
plr.PlayerGui.Shop.Frame.Visible = false
wait(1)
debounce = false
end
end)

Forgot something.
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
16 May 2014 10:42 PM
[ Content Deleted ]
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
16 May 2014 10:44 PM
[ Content Deleted ]
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 May 2014 10:47 PM
Any output?
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
17 May 2014 10:57 AM
[ Content Deleted ]
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 May 2014 12:31 PM
Try this

local debounce = false;
script.Parent.Touched:connect(function(hit)
     if debounce or not(hit and hit.Parent) then return; end
     
     local plr = Game.Players:GetPlayerFromCharacter(hit.Parent);
     local hum = script.Parent:FindFirstChild("Humanoid");
     if plr and hum then
          local frame = plr.PlayerGui:FindFirstChild("Shop") and plr.PlayerGui.Shop:FindFirstChild("Frame");
          if frame then
               debounce = true;
               frame.Visible = false;
               wait(1);
               debounce = false;
          end
     end
end)
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
17 May 2014 12:53 PM
[ Content Deleted ]
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 May 2014 12:54 PM
add print(frame) before if frame, see if it's nil
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
17 May 2014 12:54 PM
[ Content Deleted ]
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
17 May 2014 12:56 PM
[ Content Deleted ]
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 May 2014 01:00 PM
Add prints every other line, see where it stops.
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
17 May 2014 01:02 PM
[ Content Deleted ]
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
17 May 2014 01:05 PM
[ Content Deleted ]
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 May 2014 01:06 PM
Even before line 3?
Is your script disabled or something because something for sure should of printed on line 2 when you touched it, and line 1
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
17 May 2014 01:12 PM
[ Content Deleted ]
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 May 2014 01:13 PM
The line 3 one didn't print when you touched the part?

local debounce = false;
print("A");
script.Parent.Touched:connect(function(hit)
print("B");
if debounce or not(hit and hit.Parent) then return; end
print("C");
...

see if it reaches C
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
17 May 2014 01:15 PM
[ Content Deleted ]
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