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: Saving Variables

Previous Thread :: Next Thread 
SirIngenuity is not online. SirIngenuity
Joined: 06 Oct 2012
Total Posts: 3149
24 Aug 2015 05:42 PM
Can I save grip variable

game.Players.LocalPlayer.Character.TOOL.GripPos = game.Players.LocalPlayer.Character.TOOL.GripPos.Vector3 + Vector3.new(1, 0, 0)
Report Abuse
SkySpell is not online. SkySpell
Joined: 01 Sep 2008
Total Posts: 1581
24 Aug 2015 05:45 PM
Yeah. Make a variable that copies the original variable of the Gripped Position.
Report Abuse
SirIngenuity is not online. SirIngenuity
Joined: 06 Oct 2012
Total Posts: 3149
24 Aug 2015 05:45 PM
How would I do that
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
24 Aug 2015 05:46 PM
You can't save the property itself but you can reference the tool, then index the property.

local plr = game.Players.LocalPlayer;
local tool = plr.Character.TOOL;
tool.GripPos = tool.GripPos + Vector3.new(1,0,0);
Report Abuse
SkySpell is not online. SkySpell
Joined: 01 Sep 2008
Total Posts: 1581
24 Aug 2015 05:47 PM
^

That's what I meant to say.
Report Abuse
SirIngenuity is not online. SirIngenuity
Joined: 06 Oct 2012
Total Posts: 3149
24 Aug 2015 06:01 PM
Welp

17:00:38.588 - Z cannot be assigned to
17:00:38.588 - Script 'Players.Player.Backpack.Goalie.LocalScript', Line 19
17:00:38.589 - Stack End

game.Players.LocalPlayer.Character["Right Arm"].Position.Z = game.Players.LocalPlayer.Character["Right Arm"].Position.Z + 2
Report Abuse
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
24 Aug 2015 06:02 PM
Z is read-only. You can't just change ONLY ONE value. You need to change the whole thing.
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
27 Aug 2015 06:32 PM
First of all, you can't just change one axis of a Vector. You have to change the vector entirely. The X, Y, and Z values are read-only. Secondly, simply changing the location of the arm is not going to make it move as directed, relative to the Character. You have to edit the actual arm weld.


local plr = game.Players.LocalPlayer;
local arm = plr.Character.Torso["Right Shoulder"];

arm.C0 = arm.C0 * CFrame.new(0,0,2);
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