|
| 03 Oct 2017 04:10 PM |
any idea how to add rotation to this?
event.Event:connect(function(model,endpos, rot, speed) if model.PrimaryPart == nil then return end for i = 0, 1, speed do if model == nil or model.PrimaryPart == nil then break end model:SetPrimaryPartCFrame(model.PrimaryPart.CFrame:lerp(endpos, i)) if model.PrimaryPart.CFrame ~= model.PrimaryPart.CFrame:lerp(endpos, i) then break end wait() end return end)
any time I try to do endpos * CFrame.FromEulerAnglesXYZ(0, rot, 0) it just spins the model around constantly even though rot is always just one number.
|
|
|
| Report Abuse |
|
| |
|
| 03 Oct 2017 04:19 PM |
| CFrame.new(primaryPart.Position)*CFrame.Angles(0,math.rad(90),0) |
|
|
| Report Abuse |
|
| |
| |