I made this script that should make a wave go up, until a certain height. I succeeded in making the wave stop going up within the i-loop, but it makes the entire wave stop. I would like it to keep moving in the X-direction. How do i make sure the CFrame.X doesn't stop?
local Tsunami = script.Parent local MaxHeigth = 44 local StartPosition = Vector3.new(-0.231, -76, 1016.603) for i = 1,1000 do wait(.01) Tsunami.CFrame = CFrame.new(StartPosition) + Vector3.new(0,0,i*-5) + Vector3.new(0,i,0) if Tsunami.CFrame.Y == MaxHeigth then Tsunami.CFrame.Y = MaxHeigth Tsunami.CFrame.X = i*-5 end end
Hi Zuru,
local tween_s = game:GetService("TweenService"); local ending_x, ending_y = 50, 20; local part = workspace.Part; local props = {Position = Vector3.new(ending_x, ending_y, part.Position.Z)}; local speed = 5; -- The amount of seconds it will take to arrive at its location. local info = TweenInfo.new(speed, Enum.EasingStyle.Linear, Enum.EasingDirection.In); local tween = tween_s:Create(part, info, props); tween:Play();
Thanks,
Best regards,
~~ KingLoneCat