I made a brick named "FF" that contained the script to move Engine and Wing1. I want to make the "FF" brick regenerate after 5 seconds, after being touched. Sorry for not specifically telling you guys.
Engine = script.Parent.Parent.Engine
Wing1 = script.Parent.Parent.Wing1
function onTouched(hit)
local human = hit.Parent:findFirstChild("Humanoid")
if (human ~= nil) then
for loop = 1, 100 do
Engine.CFrame = Engine. CFrame *CFrame.new(0, 0, -.1) -- z makes it move forwad
wait(1/25)
Wing1.CFrame = Wing1.CFrame *CFrame.new(0, 0, .1)
wait(1/25)
end
end
end
script.Parent.Touched:connect(onTouched)

1 comment
I see a wing and an engine moving forward, but what part are you trying to regenerate? What exactly do you mean by "regenerate"?