|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 26 Sep 2015 11:29 AM |
Rayk what is your problem? You want CFrame or something?
-The [Guy] |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 26 Sep 2015 11:30 AM |
just think about it
Red Blossoms |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
|
| 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 |
|
|
| |
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
| |
|
| |
|
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
|
  |
| 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
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
| |
|
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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 26 Sep 2015 12:06 PM |
lol why would you want that
Red Blossoms |
|
|
| Report Abuse |
|
|