ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 12 Jan 2014 09:54 PM |
Script 1:
game.Players.PlayerAdded:connect(function(plr) if plr then if plr:IsInGroup(1023176) then if plr:GetRankInGroup(1023176)~=255 then local cl=game.Lighting.Claws:Clone() cl.Clawsmo:Destroy() cl.Parent=plr.StarterGear plr:LoadCharacter() local a=game.Lighting.Claws.Clawsmo:Clone() a.Parent=plr.Character a.Name="claw1" w1=Instance.new("Weld") w1.Parent=a w1.Part0=plr.Character:findFirstChild("Left Arm") w1.Part1=a w1.C0=CFrame.new(0, -1.5, -.4) * CFrame.Angles(math.pi/2, math.pi, math.pi) local b=game.Lighting.Claws.Clawsmo:Clone() b.Parent=plr.Character b.Name="claw2" w1=Instance.new("Weld") w1.Parent=b w1.Part0=plr.Character:findFirstChild("Right Arm") w1.Part1=b w1.C0=CFrame.new(0, -1.5, -.4) * CFrame.Angles(math.pi/2, math.pi, math.pi) wait() end end end end)
Workspace.ChildAdded:connect(function(zas) local plr=game.Players:GetPlayerFromCharacter(zas) if plr then if plr:IsInGroup(1023176) then if plr:GetRankInGroup(1023176)~=255 then local at=game.Lighting.Claws.Clawsmo:Clone() at.Parent=plr.Character at.Name="claw1" w1=Instance.new("Weld") w1.Parent=at w1.Part0=plr.Character:findFirstChild("Left Arm") w1.Part1=at w1.C0=CFrame.new(0, -1.5, -.4) * CFrame.Angles(math.pi/2, math.pi, math.pi) local bt=game.Lighting.Claws.Clawsmo:Clone() bt.Parent=plr.Character bt.Name="claw2" w1=Instance.new("Weld") w1.Parent=bt w1.Part0=plr.Character:findFirstChild("Right Arm") w1.Part1=bt w1.C0=CFrame.new(0, -1.5, -.4) * CFrame.Angles(math.pi/2, math.pi, math.pi) end end end end)
Script 2:
tool=script.Parent plr=game.Players.LocalPlayer char=plr.Character cl=char:findFirstChild("claw1") ca=char:findFirstChild("claw2")
tool.Equipped:connect(function() cl.Transparency=1 end)
tool.Unequipped:connect(function() ca.Transparency=0 end)
It returns cl and ca for script 2 as nil. It should not. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 12 Jan 2014 09:55 PM |
cl=char:WaitForChild("claw1") ca=char:WaitForChild("claw2") |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 12 Jan 2014 09:56 PM |
| I'll try it out real quick. |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 12 Jan 2014 10:01 PM |
With that, try adding this to the top of script 2:
repeat wait(0) until game.Players.LocalPlayer and Game.Players.LocalPlayer.Character |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 12 Jan 2014 10:11 PM |
| This works perfectly in test mode. But not in play... |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 12 Jan 2014 10:13 PM |
| is script 2 in a local script? |
|
|
| Report Abuse |
|
|
|
| 12 Jan 2014 10:14 PM |
if plr:GetRankInGroup(1023176)~=255 then
Should be
if plr:GetRoleInGroup(1023176)~=255 then |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 12 Jan 2014 10:15 PM |
| No, it should be GetRankInGroup |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 12 Jan 2014 10:16 PM |
| Role returns the name of the rank. Cnt, it's not Local. Should it be? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 12 Jan 2014 10:16 PM |
| Yeah it should, since you are using LocalPlayer |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
| |
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 12 Jan 2014 10:19 PM |
| Won't work as a LocalScript! |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 12 Jan 2014 10:21 PM |
| No, the second script must be a local script, not the first |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 12 Jan 2014 10:22 PM |
| Would you like a model of this? You will just have to put the claws into Lighting. |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 12 Jan 2014 10:22 PM |
| Yeah. I changed the second. First is regular. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 12 Jan 2014 10:23 PM |
| How does your second script currently look? |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 12 Jan 2014 10:24 PM |
repeat wait(0) until game.Players.LocalPlayer and game.Players.LocalPlayer.Character tool=script.Parent plr=game.Players.LocalPlayer char=plr.Character cl=char:WaitForChild("claw1") ca=char:WaitForChild("claw2")
tool.Equipped:connect(function() cl.Transparency=1 ca.Transparency=1 end)
tool.Unequipped:connect(function() cl.Transparency=0 ca.Transparency=0 end) |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 12 Jan 2014 10:25 PM |
| So the arms get added but the tool doesn't make them invisible, correct? |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 12 Jan 2014 10:27 PM |
| When equipped, the claws become invisible and visible when unequipped. It does not add them. The first one does. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 12 Jan 2014 10:29 PM |
That's not what I'm asking. I'm asking, do the claws get added at all (first script) and if so: when you equip/unequip it, does it not make it invisible/visible |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 12 Jan 2014 10:31 PM |
| The claws are added in the first script.It does not make them invisible/visible. That part is broke. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 12 Jan 2014 10:32 PM |
| Is there an output or it works in solo and not online? |
|
|
| Report Abuse |
|
|