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
|
  |
| Joined: 23 Jan 2014 |
| Total Posts: 2106 |
|
| |
|
Tyler2D
|
  |
| Joined: 23 Jan 2014 |
| Total Posts: 2106 |
|
| |
|
| |
|
99names
|
  |
| Joined: 06 Jan 2011 |
| Total Posts: 213 |
|
| |
|
99names
|
  |
| Joined: 06 Jan 2011 |
| Total Posts: 213 |
|
| |
|
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 |
|
|