ToboboT
|
  |
| Joined: 25 Jun 2011 |
| Total Posts: 2385 |
|
|
| 10 Jul 2013 06:42 PM |
local q = "Chicken find" -- CoD this is case sensitive just like in the other script.. local a = script.QuestInfo
script.Parent.Touched:connect(function(h) if h.Parent:findFirstChild("Humanoid") then local hh = h.Parent.Name local hhh = game.Players:findFirstChild(hh) local z = a:clone() if hhh:findFirstChild(q) then elseif hhh.PlayerGui:findFirstChild("QuestInfo") then else if hhh:findFirstChild(q) then else local zz = z.Quest zz.Parent = hhh zz.Name = zz.Value z.Parent = hhh.PlayerGui end end end end)
I just want this to insert one. And then if you already found it in the player then don't insert one, but it does. |
|
|
| Report Abuse |
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 10 Jul 2013 07:42 PM |
Add a debounce. http://wiki.roblox.com/index.php/Debounce
Also, your if statements seem to be a tad overcomplicated..
local q = "Chicken find" -- CoD this is case sensitive just like in the other script.. local a = script.QuestInfo local db = false
script.Parent.Touched:connect(function(h) if db then return end db = true plr = game.Players:GetPlayerFromCharacter(h.Parent) if h and not h.PlayerGui:FindFirstChild("QuestInfo") and not plr:FindFirstChild(q) then local z = a:clone() local zz = z.Quest zz.Parent = plr zz.Name = zz.Value z.Parent = plr.PlayerGui end db = false end) |
|
|
| Report Abuse |
|