djboy
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 794 |
|
|
| 13 Aug 2013 01:11 PM |
Ok on this script i really do not know what the problem is. i am getting no output, THe problem is when i click the gui it works but it only makes 1 of the hats i am wearing invisible then 5 seconds later it will come back but another hat will become invisible. I do not know how to fix this. All i want it to do is Make all the hats i am wearing invisible then 5 seconds later they all become visible again. and done -------------------------------------------
function Remove() local player = script.Parent.Parent.Parent.Parent.Parent.Character for i,v in pairs(player:GetChildren()) do if v.ClassName == "CharacterMesh" or v.ClassName == "Hat" then v.Handle.Transparency = 1 wait(5) v.Handle.Transparency = 0 end end end
script.Parent.MouseButton1Down:connect(Remove) ---------------------------------------------- |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 13 Aug 2013 01:13 PM |
function Equip() for i,v in ipairs(game.Players:children()) do if script:IsDescendantOf(v) then plr = v repeat wait() until plr.Character char = plr.Character for i,v in pairs(char:GetChildren()) do if v:IsA("Hat") then v.Handle.Transparency = 1 end end for i,v in pairs(char:GetChildren()) do wait(60) --Change to how long to keep it transparent if v:IsA("Hat") then v.Handle.Transparency = 0 end end end end end script.Parent.MouseButton1Down:connect(Equip) |
|
|
| Report Abuse |
|
|
djboy
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 794 |
|
|
| 13 Aug 2013 01:15 PM |
The line to make it re-appear is not making it reappear
|
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
| |
|
|
| 13 Aug 2013 01:16 PM |
function Remove() local player = script.Parent.Parent.Parent.Parent.Parent.Character playerc = player:GetChildren for i=1, #playerc do object = playerc[i] if object.ClassName == "CharacterMesh" or object.ClassName == "Hat" then object.Handle.Transparency = 1 end wait(5) for i=1, #playerc do object = playerc[i] if object.ClassName == "CharacterMesh" or object.ClassName == "Hat" then object.Handle.Transparency = 0 end end end end
script.Parent.MouseButton1Down:connect(Remove)
This should work |
|
|
| Report Abuse |
|
|
djboy
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 794 |
|
|
| 13 Aug 2013 01:17 PM |
@Fire your does not work completly.
And the other script works fine but it just wont make the hats re-appear |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
| |
|
djboy
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 794 |
|
|
| 13 Aug 2013 01:19 PM |
| Ik. I am waiting 60 seconds and i have been. it wont re-apear |
|
|
| Report Abuse |
|
|
djboy
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 794 |
|
|
| 13 Aug 2013 01:24 PM |
I have got it working. you put the wait(60) in the wrong spot. This is how it should be
------------------ function Equip() for i,v in ipairs(game.Players:children()) do if script:IsDescendantOf(v) then plr = v repeat wait() until plr.Character char = plr.Character for i,v in pairs(char:GetChildren()) do if v:IsA("Hat") then v.Handle.Transparency = 1 end end wait(60) for i,v in pairs(char:GetChildren()) do if v:IsA("Hat") then v.Handle.Transparency = 0 end end end end end script.Parent.MouseButton1Down:connect(Equip) ----------------------- but thanks bro couldent have done it with out u |
|
|
| Report Abuse |
|
|