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: wth

Previous Thread :: Next Thread 
rocklego12 is not online. rocklego12
Joined: 09 Dec 2011
Total Posts: 289
26 Jul 2016 04:25 PM
So this works in studio but when I test on a server it does not get the Character.

--chr--
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Head = Character:WaitForChild("Head")
local LeftArm = Character:WaitForChild("Left Arm")
local RightArm = Character:WaitForChild("Right Arm")
local Cam = game.Workspace.CurrentCamera


when I go into a server to test it says

"Players.Player1.Backpack.FrameWork:9: attempt to index local 'Character' (a nil value)"

It works in studio and the Character of the player is obviously there...????????
Report Abuse
peIicans is not online. peIicans
Joined: 02 Nov 2013
Total Posts: 1148
26 Jul 2016 04:26 PM
try char = player:WaitForChild("Character")


Report Abuse
peIicans is not online. peIicans
Joined: 02 Nov 2013
Total Posts: 1148
26 Jul 2016 04:30 PM
no do char = player.CharactedAdded:wait()


Report Abuse
rocklego12 is not online. rocklego12
Joined: 09 Dec 2011
Total Posts: 289
26 Jul 2016 04:32 PM
Yeah I tried that but in the output it says:

17:29:37.554 - Infinite yield possible on 'Players.rocklego12:WaitForChild("Character")'

and does not work
Report Abuse
llaserx is not online. llaserx
Joined: 10 Dec 2011
Total Posts: 53069
26 Jul 2016 04:34 PM
local plr = game.Players.LocalPlayer
repeat wait() until plr.Character
local char = plr.Character

that inf yeild is a warning not an error

its just saying it can wait forever


r+://290739801r+://290739819r+://290739831 R$248 (づ ゚ ³ ゚)づ
Report Abuse
rocklego12 is not online. rocklego12
Joined: 09 Dec 2011
Total Posts: 289
26 Jul 2016 04:37 PM
Okay it works thanks.
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