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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: why will this work in studio, but not in a real game

Previous Thread :: Next Thread 
misosoup1 is not online. misosoup1
Joined: 22 Jan 2011
Total Posts: 286
13 Feb 2016 04:34 PM
local player = game.Players.LocalPlayer
local character = player.Character

function change()
character.Humanoid.WalkSpeed = character.Humanoid.Health^0.60206
end

character.Humanoid.Changed:connect(change)

//

Do I have to put it in a local script or is it something else?
Report Abuse
CrustyCitation5 is not online. CrustyCitation5
Joined: 03 Feb 2016
Total Posts: 155
13 Feb 2016 04:35 PM
Yes you have to put it in a local script. You must also disable filtering.
Report Abuse
misosoup1 is not online. misosoup1
Joined: 22 Jan 2011
Total Posts: 286
13 Feb 2016 04:37 PM
TY
Report Abuse
misosoup1 is not online. misosoup1
Joined: 22 Jan 2011
Total Posts: 286
13 Feb 2016 04:50 PM
it still doesnt work...
Report Abuse
CrustyCitation5 is not online. CrustyCitation5
Joined: 03 Feb 2016
Total Posts: 155
13 Feb 2016 04:53 PM
Is there an error? Press F9 in-game and check the red errors.
Report Abuse
misosoup1 is not online. misosoup1
Joined: 22 Jan 2011
Total Posts: 286
13 Feb 2016 04:55 PM
attempted to index local 'character'
Report Abuse
darkemosoul is not online. darkemosoul
Joined: 13 Dec 2008
Total Posts: 458
13 Feb 2016 04:57 PM
Character doesn't exist, probably when you tried to make a reference to the Player's character it was nil. Add a wait, or add something that waits until the character exists.
Report Abuse
gangman67 is not online. gangman67
Joined: 04 Jun 2011
Total Posts: 798
13 Feb 2016 04:58 PM
Your not waiting for the character to be added
Report Abuse
CrustyCitation5 is not online. CrustyCitation5
Joined: 03 Feb 2016
Total Posts: 155
13 Feb 2016 04:58 PM
Add this after the first line of code

repeat wait() until player.Character
Report Abuse
misosoup1 is not online. misosoup1
Joined: 22 Jan 2011
Total Posts: 286
13 Feb 2016 05:11 PM
Thank you all so much!
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