Realistic Flags? How can I go about doing this!

Im currently working on a project and im wondering how I can make some wavy and realistic flags!
here’s a example of some other devs who have done similar stuff!



Any help loved!

1 Like

I think they use attachments for the flag like many other flags are made, or they use tons of meshes of the flag and make the previous one transparent in a loop to achieve this affect

1 Like

You could probably use a beam to make this. If you mess around with beam’s curve sizes and attachment’s position and orientation, you could make a realistic wavy flag.

Here's a short video of how I did it
(The flag may not look very realistic compared to the one you provided as I didn’t spend much time on it.)
And the script used to animate the flag (note that I rushed making it)
local TweenService = game:GetService("TweenService")

local TInfo = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)

local Part = script.Parent
local Beam = Part:WaitForChild("Beam")
local Attachment2 = Part:WaitForChild("Attachment2")

coroutine.wrap(function()
	while true do
		TweenService:Create(Attachment2, TInfo, {Position = Vector3.new(Attachment2.Position.X, Attachment2.Position.Y, 1)}):Play()
		TweenService:Create(Attachment2, TInfo, {Orientation = Vector3.new(5, 5, 5)}):Play()
		wait(1)
		TweenService:Create(Attachment2, TInfo, {Position = Vector3.new(Attachment2.Position.X, Attachment2.Position.Y, -1)}):Play()
		TweenService:Create(Attachment2, TInfo, {Orientation = Vector3.new(-5, -5, -5)}):Play()
		wait(1)
	end
end)()

coroutine.wrap(function()
	while true do
		for i = 0, 5, 0.1 do
			game:GetService("RunService").Stepped:Wait()
			Beam.CurveSize0 = i
		end
		for i = 5, 0, -0.1 do
			game:GetService("RunService").Stepped:Wait()
			Beam.CurveSize0 = i
		end
	end
end)()

coroutine.wrap(function()
	while true do
		for i = 0, 5, 0.1 do
			game:GetService("RunService").Stepped:Wait()
			Beam.CurveSize1 = i
		end
		for i = 5, 0, -0.1 do
			game:GetService("RunService").Stepped:Wait()
			Beam.CurveSize1 = i
		end
	end
end)()

I believe you could also do this through mesh deformation, but that’s still in Studio beta, which means it’s not available in-game.

2 Likes