|
| 10 Nov 2015 08:02 AM |
This part is not cancollide, and the player should be able to walk through it. I want the object to move into the players torso almost, and be in that position, but instead when it moves it automatically goes ontop the player. How can I fix this?
bin.Selected:connect(function(Mouse) Mouse.Button1Down:connect(function()
Eff2:MoveTo(Vector3.new(5,1,0)+game.Players.LocalPlayer.Character.Head.Position)
end end) end) |
|
|
| Report Abuse |
|
|
amanda
|
  |
| Joined: 21 Nov 2006 |
| Total Posts: 5925 |
|
|
| 10 Nov 2015 08:07 AM |
| CFrame it or use a BodyMover |
|
|
| Report Abuse |
|
|
Ben1925
|
  |
| Joined: 07 Apr 2011 |
| Total Posts: 741 |
|
|
| 10 Nov 2015 08:07 AM |
| Try using CFrame instead of Vector3. |
|
|
| Report Abuse |
|
|
|
| 10 Nov 2015 08:10 AM |
I tried; Eff1:MoveTo(CFrame.new(5,1,0)+game.Players.LocalPlayer.Character.Head.Position)
but it errored "Eff1:MoveTo(CFrame.new(5,1,0)+game.Players.LocalPlayer.Character.Head.Position)"
I should have mentioned this was a model i'm trying to move properly. |
|
|
| Report Abuse |
|
|
|
| 10 Nov 2015 08:11 AM |
Error is; Unable to cast CoordinateFrame to Vector3 |
|
|
| Report Abuse |
|
|
Ben1925
|
  |
| Joined: 07 Apr 2011 |
| Total Posts: 741 |
|
|
| 10 Nov 2015 08:14 AM |
Oh! Yes, you can't CFrame models directly, but you can CFrame their primary part. Set a primary part in a model by
game.Workspace.Model.PrimaryPart = game.Workspace.Model.PartYouWantToSetAsPrimary
Then, do
game.Workspace.Model:SetPrimaryPartCFrame(CFrame.new(Vector3.new(x,x,x))
All other parts in the model will also be moved and will maintain their orientation and offset respective to the Primary part. This should work. If it doesn't, or if i missed something, please let me know! |
|
|
| Report Abuse |
|
|
|
| 10 Nov 2015 08:19 AM |
@Ben
Thank you so much!!111 |
|
|
| Report Abuse |
|
|
Ben1925
|
  |
| Joined: 07 Apr 2011 |
| Total Posts: 741 |
|
|
| 10 Nov 2015 08:24 AM |
| You're welcome! It's great to know I helped someone :D |
|
|
| Report Abuse |
|
|