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: Uhm..position issue

Previous Thread :: Next Thread 
UnderWorldOnline is not online. UnderWorldOnline
Joined: 31 Dec 2010
Total Posts: 7883
26 Sep 2015 11:19 AM
So, the object called "CandyRedBar" is nowhere to be found when it's positioned is changed here:

local t = game.ServerStorage.RedCandyBar:Clone(game.Workspace)
t.Position = Vector3.new(script.Parent.Parent.SlideAnimationTest.Position*0,9,1)

But there are no errors in output, where did it go?
Report Abuse
Locard is not online. Locard
Joined: 13 Apr 2014
Total Posts: 3516
26 Sep 2015 11:24 AM
Vector3.new(script.Parent.Parent.SlideAnimationTest.Position*0,9,1)

You're multiplying a vector value to 0, which will set the vector value to 0,0,0. Then you have the numbers 9 and 1 following it, so your values are is 0,0,0,9,1. I'm not sure how that's not erroring, though.
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
26 Sep 2015 11:25 AM
t.Position = Vector3.new(script.Parent.Parent.SlideAnimationTest.Position*0,9,1)

to

t.Position = script.Parent.Parent.SlideAnimationTest.Position * Vector3.new(0,9,1)

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
BusyCityGuy is not online. BusyCityGuy
Joined: 17 Aug 2012
Total Posts: 2144
26 Sep 2015 11:26 AM
local t = game.ServerStorage.RedCandyBar:Clone()
t.Parent = workspace
t.Position = script.Parent.Parent.SlideAnimationTest.Position * Vector3.new(0,9,1)

Or if you just want it to show up at 0,9,1 it would be

t.Position = Vector3.new(0,9,1)

-The [Guy]
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
26 Sep 2015 11:27 AM
omg i want all of you to die when you set Position


Red Blossoms
Report Abuse
BusyCityGuy is not online. BusyCityGuy
Joined: 17 Aug 2012
Total Posts: 2144
26 Sep 2015 11:29 AM
Rayk what is your problem? You want CFrame or something?

-The [Guy]
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
26 Sep 2015 11:30 AM
just think about it


Red Blossoms
Report Abuse
BusyCityGuy is not online. BusyCityGuy
Joined: 17 Aug 2012
Total Posts: 2144
26 Sep 2015 11:32 AM
I quote the wiki, "As you should know from the absolute beginner's guide to scripting, you changed the Position by using the equal sign. "

So..... what exactly is your big issue, man, get over it.

-The [Guy]
Report Abuse
UnderWorldOnline is not online. UnderWorldOnline
Joined: 31 Dec 2010
Total Posts: 7883
26 Sep 2015 11:32 AM
It's still nowhere to be found

t.Position = script.Parent.Parent.SlideAnimationTest.Position + Vector3.new(0,9,0)
Report Abuse
BusyCityGuy is not online. BusyCityGuy
Joined: 17 Aug 2012
Total Posts: 2144
26 Sep 2015 11:34 AM
Set it to
t.Position = Vector3.new(0,0,0)

and look if it's there.

-The [Guy]
Report Abuse
UnderWorldOnline is not online. UnderWorldOnline
Joined: 31 Dec 2010
Total Posts: 7883
26 Sep 2015 11:36 AM
It isn't. Weird
Report Abuse
BusyCityGuy is not online. BusyCityGuy
Joined: 17 Aug 2012
Total Posts: 2144
26 Sep 2015 11:37 AM
Did you make sure to separate

local t = game.ServerStorage.RedCandyBar:Clone()
t.Parent = workspace

because :Clone(workspace) won't do anything.

-The [Guy]
Report Abuse
UnderWorldOnline is not online. UnderWorldOnline
Joined: 31 Dec 2010
Total Posts: 7883
26 Sep 2015 11:39 AM
Oh, thanks! It fixed it.
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
26 Sep 2015 11:39 AM
think
about
it


Red Blossoms
Report Abuse
BusyCityGuy is not online. BusyCityGuy
Joined: 17 Aug 2012
Total Posts: 2144
26 Sep 2015 11:47 AM
You scare me.

-The [Guy]
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
26 Sep 2015 11:51 AM
CFrame is much more accurate than Position, and it ignores the hitboxes of other parts, where Position will place the part above another part if that part is already occupying given Position. CFrame also has rotation, which makes it much cooler, since you can do so much more. Also, setting Position breaks joints

the only valid reason for using .Position and when you want to read it, not write


Red Blossoms
Report Abuse
Dogejia is not online. Dogejia
Joined: 08 Feb 2012
Total Posts: 1873
26 Sep 2015 11:55 AM
@Ray

He does have a point, but I would suppose .Position is more simple,


pet doge everyday
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
26 Sep 2015 11:56 AM
LOL SIMPLE
LOL


Red Blossoms
Report Abuse
Dogejia is not online. Dogejia
Joined: 08 Feb 2012
Total Posts: 1873
26 Sep 2015 11:58 AM
@Ray

If it isnt more simple, then I don't know why its a thing >:) (maybe roblox is too lazy to remove it, or lots of people use that over CFrame)


pet doge everyday
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
26 Sep 2015 11:59 AM
It is more simple, but you can accomplish pretty much the exact same thing with CFrame, and it wouldn't be any different

part.Position = Vector3.new(10,10,10)
part.CFrame = CFrame.new(10,10,10)

I just occasionally read it, not write to it


Red Blossoms
Report Abuse
BusyCityGuy is not online. BusyCityGuy
Joined: 17 Aug 2012
Total Posts: 2144
26 Sep 2015 12:00 PM
I'm fully aware of all that, but he didn't ask about CFrame? Maybe he wants it to collide?

-The [Guy]
Report Abuse
Dogejia is not online. Dogejia
Joined: 08 Feb 2012
Total Posts: 1873
26 Sep 2015 12:01 PM
Lets just say .Position is meant for breaking/colliding and CFrame is more specific.


pet doge everyday
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
26 Sep 2015 12:03 PM
lol I will shout at you everytime you set Position

how about we say that cframe is for the smarter


Red Blossoms
Report Abuse
Dogejia is not online. Dogejia
Joined: 08 Feb 2012
Total Posts: 1873
26 Sep 2015 12:05 PM
@ray

True, but I'd use .Position for stuff like colliding two bricks, or just I'm too lazy to use CFrame.


pet doge everyday
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
26 Sep 2015 12:06 PM
lol why would you want that


Red Blossoms
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