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 » Scripting Helpers
Home Search
 

Re: What did I do wrong here :/

Previous Thread :: Next Thread 
BeyondTheClouds is not online. BeyondTheClouds
Joined: 23 Oct 2013
Total Posts: 6897
22 Jun 2014 09:47 PM
local arm = Players.LocalPlayer.Character["Right Arm"]
arm.CFrame = CFrame.new(0, 10, 0)
Report Abuse
COOLDUDE11OO is not online. COOLDUDE11OO
Joined: 21 Aug 2011
Total Posts: 5115
22 Jun 2014 09:48 PM
Players isn't predefined
Report Abuse
BeyondTheClouds is not online. BeyondTheClouds
Joined: 23 Oct 2013
Total Posts: 6897
22 Jun 2014 09:48 PM
what do you mean by that
could you please add an example
Report Abuse
BeyondTheClouds is not online. BeyondTheClouds
Joined: 23 Oct 2013
Total Posts: 6897
22 Jun 2014 09:49 PM
im also running it locally :/
Report Abuse
Zerio920 is not online. Zerio920
Joined: 06 Apr 2012
Total Posts: 3311
22 Jun 2014 09:50 PM
He basically means "Players" doesn't mean anything. The script doesn't know what "Players" is, you'll have to put the location for that. So if, by "Players", you mean the folder "Players", you would put game.Players rather than just Players.
Report Abuse
BeyondTheClouds is not online. BeyondTheClouds
Joined: 23 Oct 2013
Total Posts: 6897
22 Jun 2014 09:51 PM
local arm = game.Players.LocalPlayer.Character["Right Arm"]
arm.CFrame = CFrame.new(0, 10, 0)

-- i tried that still doesnt work
Report Abuse
Zerio920 is not online. Zerio920
Joined: 06 Apr 2012
Total Posts: 3311
22 Jun 2014 09:53 PM
Second problem, like before, "Right Arm" isn't defined. Look on the wiki, you'll see that locations are specified by periods rather than brackets or whatever you were using.
Report Abuse
BeyondTheClouds is not online. BeyondTheClouds
Joined: 23 Oct 2013
Total Posts: 6897
22 Jun 2014 09:54 PM
oh. thanks for actually helping me this time.
Report Abuse
IAmTheRolo is online. IAmTheRolo
Joined: 12 Nov 2013
Total Posts: 859
22 Jun 2014 09:55 PM
There's nothing wrong with how you defined arm. Where is the script located?
Report Abuse
BeyondTheClouds is not online. BeyondTheClouds
Joined: 23 Oct 2013
Total Posts: 6897
22 Jun 2014 09:56 PM
in workspace
Report Abuse
Zerio920 is not online. Zerio920
Joined: 06 Apr 2012
Total Posts: 3311
22 Jun 2014 09:56 PM
Oh really? Nevermind then I'm still new with this. Where is the script in though?
Report Abuse
BeyondTheClouds is not online. BeyondTheClouds
Joined: 23 Oct 2013
Total Posts: 6897
22 Jun 2014 09:56 PM
Finally I did something right.
Report Abuse
Zerio920 is not online. Zerio920
Joined: 06 Apr 2012
Total Posts: 3311
22 Jun 2014 09:56 PM
I was talking to rolo*

You should put the script in StarterPack if it's a localscript.
Report Abuse
BeyondTheClouds is not online. BeyondTheClouds
Joined: 23 Oct 2013
Total Posts: 6897
22 Jun 2014 09:57 PM
it's in workspace
Report Abuse
BeyondTheClouds is not online. BeyondTheClouds
Joined: 23 Oct 2013
Total Posts: 6897
22 Jun 2014 09:58 PM
im not running this in studio im running this in a game
Report Abuse
Zerio920 is not online. Zerio920
Joined: 06 Apr 2012
Total Posts: 3311
22 Jun 2014 09:58 PM
Yeah I know. I meant you should move it into StarterPack.
Report Abuse
Zerio920 is not online. Zerio920
Joined: 06 Apr 2012
Total Posts: 3311
22 Jun 2014 09:59 PM
Oh really? You should use Studio, it's much easier.
Report Abuse
BeyondTheClouds is not online. BeyondTheClouds
Joined: 23 Oct 2013
Total Posts: 6897
22 Jun 2014 09:59 PM
yea but i acutally want to see it work
Report Abuse
Zerio920 is not online. Zerio920
Joined: 06 Apr 2012
Total Posts: 3311
22 Jun 2014 10:00 PM
You can still see it work in Studio. There's a little "play" button on the top, it lets you run the script so you can see it without playing it.

There's also a "play solo" button that lets you play the game in studio with your player.
Report Abuse
IAmTheRolo is online. IAmTheRolo
Joined: 12 Nov 2013
Total Posts: 859
22 Jun 2014 10:02 PM
LocalScripts don't run in workspace. Only in places which are childs/linked to a player.

@Zerio

Using brackets allows him to define the right arm, as after all, the name does have a space in it.

local arm = game.Players.LocalPlayer.Character.Right Arm
>Errors
local arm = game.Players.LocalPlayer.Character["Right Arm"]
>Works
Report Abuse
BeyondTheClouds is not online. BeyondTheClouds
Joined: 23 Oct 2013
Total Posts: 6897
22 Jun 2014 10:05 PM
it does not work in solo
im using the command bar
Report Abuse
BeyondTheClouds is not online. BeyondTheClouds
Joined: 23 Oct 2013
Total Posts: 6897
22 Jun 2014 10:07 PM
ok i made the local script
idk where to put it
also i cant make it so the script updates
it wont even work
Report Abuse
COOLDUDE11OO is not online. COOLDUDE11OO
Joined: 21 Aug 2011
Total Posts: 5115
22 Jun 2014 10:08 PM
Local scripts only work in the player
So put that script in StarterGui
Report Abuse
BeyondTheClouds is not online. BeyondTheClouds
Joined: 23 Oct 2013
Total Posts: 6897
22 Jun 2014 10:12 PM

ok why doesnt this work

scrpt = Instance.new("LocalScript")
scrpt.Parent = game.Players.Player1.PlayerGui
scrpt.Text = local arm = game.LocalPlayer.Character["Right Arm"]
arm.CFrame = CFrame.new(0, 2, 0)
Report Abuse
IAmTheRolo is online. IAmTheRolo
Joined: 12 Nov 2013
Total Posts: 859
22 Jun 2014 10:15 PM
'scrpt.Text = local arm = game.LocalPlayer.Character["Right Arm"]
arm.CFrame = CFrame.new(0, 2, 0)'

What.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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