I made a wave, which needs to be turned 90 degrees in order to line up with the rest of the wave. I made all parts in a CFrame animation, but the wave keeps turning back to its original (0,0,0) orientation. I tried the following script, which didn't work...
1 | local Orientation = Vector 3. new( 90 , 0 , 0 ) |
2 |
3 | for i = 1 , 1000 do |
4 | wait(. 01 ) |
5 | Tsunami.CFrame = CFrame.new(StartPosition,Orientation) + Vector 3. new( 0 , 0 ,i*- 5 , 0 , 0 , 0 ) |
6 |
7 | end |
Hi Zuru,
1 | part.CFrame = part.CFrame * CFrame.Angles(math.rad( 90 ), 0 , 0 ); |
Thanks,
Best regards,
~~ KingLoneCat
Use TweenService, this gives help to any object, commonly used to animate.
01 | local t = game:GetService( "TweenService" ) |
02 |
03 | --do the function? |
04 | local goal = { } --Don't forget, add this to your code/script! |
05 | goal.CFrame = CFrame.new(POSITION,OF,CFRAME) |
06 | local Tsunami = game.Workspace.PARTNAME |
07 | Tsunami.CFrame = Tsunami.CFrame |
08 | local tween = t:Create(Tsunami, TweenInfo.new( 2 ), goal) |
09 | tween:Play() |
10 | end |
Comment below for any errors.