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: Can someone please tell me what I'm doing wrong here..

Previous Thread :: Next Thread 
Tyler2D is not online. Tyler2D
Joined: 23 Jan 2014
Total Posts: 2106
28 Jan 2014 12:27 AM
When I click the button this happens when I try to step on the button again, this script is supposed to detect if the person has the value "HasAGUI", which if it does it will give the person the gui. It works once but when I got through everything this is the output when I tried to step on it and get the GUI again..

22:26:18.058 - The Parent property of HasAGUI is locked
22:26:18.061 - Script 'Workspace.Part.Script', Line 6


cg = game.ServerStorage.BPSFoodGUI:Clone()
cv = game.ServerStorage.HasAGUI:Clone()
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and hit.Parent:FindFirstChild("HasAGUI")== nil then
cg.Parent = game.Players.LocalPlayer.PlayerGui
cv.Parent = game.Players.LocalPlayer.Character
elseif hit.Parent:FindFirstChild("Humanoid") == nil then
print("Not a human")
elseif hit.Parent:FindFirstChild("Humanoid") and hit.Parent:FindFirstChild("HasAGUI") then
print("Is a human but already has the shop GUI")
end
end)

-----------------------(TEXT BUTTON SCRIPT BELOW, ABOVE IS IN A PART)

script.Parent.MouseButton1Click:connect(function()
script.Parent.Parent:Destroy()
game.Players.LocalPlayer.Character.HasAGUI:Destroy()
end)
Report Abuse
Tyler2D is not online. Tyler2D
Joined: 23 Jan 2014
Total Posts: 2106
28 Jan 2014 12:29 AM
2
Report Abuse
Tyler2D is not online. Tyler2D
Joined: 23 Jan 2014
Total Posts: 2106
28 Jan 2014 12:30 AM
3
Report Abuse
GhostKilla45 is not online. GhostKilla45
Joined: 25 Dec 2013
Total Posts: 2241
28 Jan 2014 12:36 AM
idk
Report Abuse
99names is not online. 99names
Joined: 06 Jan 2011
Total Posts: 213
28 Jan 2014 12:43 AM
Is HasAGui a thing!
Report Abuse
99names is not online. 99names
Joined: 06 Jan 2011
Total Posts: 213
28 Jan 2014 12:44 AM
?*
Report Abuse
Tyler2D is not online. Tyler2D
Joined: 23 Jan 2014
Total Posts: 2106
28 Jan 2014 12:56 AM
A stringvalue copied from ServerStorage to tell if a person has a GUI or not
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