generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: doesnt work in servers//pack is not a valid member?

Previous Thread :: Next Thread 
vastqud is not online. 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
darthdemox is not online. darthdemox
Joined: 19 Jan 2013
Total Posts: 123
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 is not online. 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
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image