– what im trying to create
– vs what i ended up creating
How would u go about creating a crater that can tween out into position and keep its orientation as it grows??? Because my script can set the orientation right at the beginning but as it grows it loses its orientation due to the cframe.angles in the tween. And changing the 0’s to math.random -360,360 causes the rock crater to look like a rock explosion like this
so that is not the solution. What should i do???
function module.CraterDestruction(RockPos,Char)
local step = 0 -- determines how big crater circle is
for i = 1,34 do
step = step + 11
local rock = Models:FindFirstChild("rock"):Clone()
rock.Parent = workspace
rock.CanCollide = false
rock.CFrame = RockPos * CFrame.new(0,-2,0) * CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))
game.Debris:AddItem(rock,10)
local goal = {}
goal.CFrame = RockPos * CFrame.Angles(0, math.rad(step), 0) * CFrame.new(0, -2.5, 18)
local info = TweenInfo.new(1,Enum.EasingStyle.Linear)
local tween = TweenService:Create(rock,info,goal)
tween:Play()
end
end