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: Modifying Vector3 values help

Previous Thread :: Next Thread 
whyOmustOitObeOme is not online. whyOmustOitObeOme
Joined: 29 Aug 2009
Total Posts: 15668
12 Apr 2014 09:55 PM
while true do
wait(0.02)
local value = script.Parent
local x, y, z = value.x, value.y, value.z
x, y, z = x + 0, y + 0.01, z + 0
script.Parent.Parent.Position = Vector3.new(x, y, z)
end

The script's parent is a Vector3Value and the parent of that is a part. But there's something wrong with the script.

Output- "x is not a valid member of Vector3Value - line 4"

Any help would be appreciated
Report Abuse
snowboarder199 is not online. snowboarder199
Joined: 15 Aug 2009
Total Posts: 2703
12 Apr 2014 09:56 PM
what is 'x' (a number value...?)
Report Abuse
whyOmustOitObeOme is not online. whyOmustOitObeOme
Joined: 29 Aug 2009
Total Posts: 15668
12 Apr 2014 10:08 PM
It's supposed to represent the 'x' value of the Vector3Value
Report Abuse
snowboarder199 is not online. snowboarder199
Joined: 15 Aug 2009
Total Posts: 2703
12 Apr 2014 11:35 PM
So assuming 'value' represents a Vector3Value...

while true do
wait(0.02)
local value = script.Parent
local x, y, z = value.Value.X, value.Value.Y, value.Value.Z
x, y, z = x + 0, y + 0.01, z + 0
script.Parent.Parent.Position = Vector3.new(x, y, z)
end
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