52sogel
|
  |
| Joined: 12 Nov 2011 |
| Total Posts: 30 |
|
|
| 08 Aug 2017 09:39 PM |
Hello, so I made a script that moves a tool from Replicated Storage to the player's backpack and it all works fine except that it doesn't move localscripts with the tool, but it moves everything else. Can someone help me fix it?
Here's the script-
function onClicked(playerWhoClicked)
local Backpack = playerWhoClicked.Backpack
local s = script.Parent:findFirstChild("PickUp")
game.ReplicatedStorage.Pickup:findFirstChild("Carbine"):Clone().Parent = Backpack for i,v in pairs(script.Parent:GetChildren()) do if v:IsA("BasePart") then v.Transparency = 1 end end script.Disabled = true s:play()
wait (10) for i,v in pairs(script.Parent:GetChildren()) do if v:IsA("BasePart") then v.Transparency = 0 end end script.Disabled = false
end script.Parent.ClickDetector.MouseClick:connect(onClicked) |
|
|
| Report Abuse |
|
|
F1ctional
|
  |
| Joined: 06 Apr 2017 |
| Total Posts: 254 |
|
|
| 08 Aug 2017 10:03 PM |
| are the localscripts inside of the tool |
|
|
| Report Abuse |
|
|
52sogel
|
  |
| Joined: 12 Nov 2011 |
| Total Posts: 30 |
|
| |
|
Tracktion
|
  |
| Joined: 06 Jun 2013 |
| Total Posts: 1893 |
|
|
| 08 Aug 2017 10:15 PM |
add this on the top script.Disabled = false
~ Almighty 全能 |
|
|
| Report Abuse |
|
|
52sogel
|
  |
| Joined: 12 Nov 2011 |
| Total Posts: 30 |
|
| |
|
52sogel
|
  |
| Joined: 12 Nov 2011 |
| Total Posts: 30 |
|
| |
|
|
| 09 Aug 2017 11:30 AM |
| b we work on the same game |
|
|
| Report Abuse |
|
|