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: Why does this work in studio but not in server?

Previous Thread :: Next Thread 
MIGHTYFIREMAN104 is not online. MIGHTYFIREMAN104
Joined: 22 Nov 2012
Total Posts: 58
03 Jun 2017 11:55 PM
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = #### ######## ######## if key == "0" then game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = "32" end end game.Players.LocalPlayer:GetMouse().KeyDown:connect(run) function dont(key) if key == "0" then game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = "16" end end game.Players.LocalPlayer:GetMouse().KeyUp:connect(dont) if game.Players.LocalPlayer.Character.Humanoid.WalkSpeed == "32" then end
Report Abuse
MIGHTYFIREMAN104 is not online. MIGHTYFIREMAN104
Joined: 22 Nov 2012
Total Posts: 58
03 Jun 2017 11:57 PM
Error Message


21:53:35.118 - Players.Player1.PlayerGui.LocalScript:1: attempt to index field 'Character' (a nil value)
Report Abuse
MIGHTYFIREMAN104 is not online. MIGHTYFIREMAN104
Joined: 22 Nov 2012
Total Posts: 58
03 Jun 2017 11:59 PM
#############################
Report Abuse
InedibleGames is not online. InedibleGames
Joined: 27 Apr 2014
Total Posts: 1140
04 Jun 2017 12:00 AM
Add at the top
repeat wait() until game.Players.LocalPlayer.Character
then at the bottom an end obviously
Report Abuse
CrystalFlameYT is not online. CrystalFlameYT
Joined: 17 Jul 2014
Total Posts: 222
04 Jun 2017 12:01 AM
If you are in studio your name would be Player1. How can you get that error if the problem is in the server?
Report Abuse
MIGHTYFIREMAN104 is not online. MIGHTYFIREMAN104
Joined: 22 Nov 2012
Total Posts: 58
04 Jun 2017 12:04 AM
because i went to my profile and pressed the play button on the gameplace... :/
Report Abuse
SinisterMemories is not online. SinisterMemories
Joined: 21 Mar 2013
Total Posts: 4892
04 Jun 2017 02:17 AM
LocalPlayer:WaitForChild("Character")


#code print("oh no an errorz!")
Report Abuse
SinisterMemories is not online. SinisterMemories
Joined: 21 Mar 2013
Total Posts: 4892
04 Jun 2017 02:18 AM
wait for player and character to be created

player = game.Players.LocalPlayer
char = player:WaitForChild("Character")


#code print("oh no an errorz!")
Report Abuse
szkiller is not online. szkiller
Joined: 21 Feb 2014
Total Posts: 360
04 Jun 2017 02:51 AM
Your script is so inefficient
Report Abuse
AxonMega is online. AxonMega
Joined: 29 Aug 2014
Total Posts: 2403
04 Jun 2017 02:57 AM
Ew deprecated events.
Report Abuse
InedibleGames is not online. InedibleGames
Joined: 27 Apr 2014
Total Posts: 1140
04 Jun 2017 03:35 AM
Don't worry I helped him fix the script to use userinputservice and gave him comment lines on what it does ^-^
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