Problem with my blocky sea

also quick note, by wave i mean the water thing but basically its got this issue where the tween looks weird, here’s the code and how it looks like ingame.
I have no clue why it looks like this

local sea = game.Workspace.Sea

for i,v in pairs(sea:GetChildren()) do
	spawn(function()
		if v.Name == "SeaWater" then
		while v.Parent == sea do 

		local OldCF = v.CFrame
		local OldSize = v.Size
			
		task.wait(math.random(0.1,0.75))

		local tween = game.TweenService:Create(v, TweenInfo.new(math.random(0.2,1)), {
		CFrame = v.CFrame * CFrame.new(0,math.random(5,25),0),
		Size = v.Size * math.random(1,1.5)
		})
		tween:Play()

		tween.Completed:Wait()

		game.TweenService:Create(v, TweenInfo.new(1), {
				CFrame = OldCF,
				Size = OldSize
		}):Play()

		task.wait(1.2)

	end
	end
	end)
end

https://gyazo.com/2338d54247a891439bc1c8e12da8c2bd

1 Like

I have no inclination what “problem with my blocky sea” means. The video offers little more than the title does. Please elaborate, what indeed is the problem with your blocky sea?

I think you mean this, change it

game.TweenService:Create(v, TweenInfo.new(1, Enum.EasingStyle.Elastic, Enum.EasingDirection.InOut, -1,true), {
		CFrame = OldCF,
		Size = OldSize
}):Play()

The post is kinda unclear but if you mean the way it springs up and down weirdly, from what I see in the video it seems the tween or animation you’re using has an Elastic Easing Style applied to it.
If it’s a tween you can change it’s Easing Style to the following:

Enum.EasingStyle.Sine

If it’s an animation you can select the keyframes in the animation editor, right click, and then I recommend you change their Easing Style to Cubic and their Easing Direction to InOut.

If you want to read on Easing Styles, here’s the link.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.