Hello Developers, im new to Roblox Devforum. I just wanted to ask how do i make my bush wave?
Thank you for any help!
3 Likes
You could do something like this?
1 Like
coolkidtris
(coolkiddtrissy)
#3
There is a script that can be used. If the bush is a mesh, simply input a script and put the following:
pos = script.Parent.Position
pos = Vector3.new(pos.x, pos.y-0.2, pos.z)
x = 0
z = 0
T = -99999
tall = script.Parent.Size.Y / 2
math.randomseed(tick())
rand = (math.random(0,20))/10
while true do
x = pos.x + (math.sin(T + (pos.x/5)) * math.sin(T/9))/3
z = pos.z + (math.sin(T + (pos.z/6)) * math.sin(T/12))/4
script.Parent.CFrame =
CFrame.new(x, pos.y, z) * CFrame.Angles((z-pos.z)/tall, 0,(x-pos.x)/-tall)
wait()
T = T + 0.12
end
3 Likes