vastqud
|
  |
| Joined: 10 Sep 2011 |
| Total Posts: 2464 |
|
|
| 12 Dec 2015 12:05 PM |
print(script.Parent:GetFullName()) local pack = game.Workspace.backpack local player = game.Players.LocalPlayer local c = player.Character pack.Parent = c local w1 = Instance.new("Weld", c) w1.Part0 = w1.Parent["Torso"] w1.Part1 = pack.base w1.C1 = CFrame.Angles(0,22,-1.567)*CFrame.new(0,0,-0.5)
it works just how I want it to in studio, but in servers it doesn't work.
when I open the developer console, it says pack is not a valid member of workspace, but it's a model in workspace
this is a localscript inside of ReplicatedFirst |
|
|
| Report Abuse |
|
|
|
| 12 Dec 2015 12:10 PM |
2 thing that may be an issue:
backpack --> Backpack? or: local pack = game.Workspace:WaitForChild("backpack") / local pack = game.Workspace:FindFirstChild("backpack") ? |
|
|
| Report Abuse |
|
|
triode
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 5844 |
|
|
| 12 Dec 2015 12:17 PM |
WaitForChild is better than FindFirstChild in this instance But you can use a loop with findfirstchild:
repeat wait() until (game.Workspace:FindFirstChild("backpack") == true; |
|
|
| Report Abuse |
|
|
|
| 12 Dec 2015 12:32 PM |
@triode FindFirstChild() does not return a boolean
#code Instance.new("BodyThrust",SenseiWarrior).position = CFrame.new(SenseiWarrior,YourGirlsDMs) |
|
|
| Report Abuse |
|
|
vastqud
|
  |
| Joined: 10 Sep 2011 |
| Total Posts: 2464 |
|
|
| 12 Dec 2015 01:06 PM |
is it possible that FilteringEnabled could be interfering with this script?
print(script.Parent:GetFullName()) local pack = game.Workspace:WaitForChild("pack") local bpack = pack:Clone() local player = game.Players.LocalPlayer local c = player.Character bpack.Parent = c local w1 = Instance.new("Weld", c) w1.Part0 = w1.Parent["Torso"] w1.Part1 = bpack.base w1.C1 = CFrame.Angles(0,22,-1.567)*CFrame.new(0,0,-0.5) |
|
|
| Report Abuse |
|
|