answersLogoWhite

0

Simple (For me).

Here put this in the brick:

script.Parent.Touched:connect(function(p)

if p.Parent:FindFirstChild("Humanoid") then

p.Parent.Humanoid.Health = 0

end

end)

Distance = 20

TimeToRise = 60

TimeForRegen = 30

Interval = 15

Waited = 0

while true do

wait()

script.Parent.CFrame = script.Parent.CFrame +Vector3.new(0,(TimeToRise/Distance),0)

Waited = Waited + (wait())

if Waited >= TimeToRise then

script.Parent.CFrame = script.Parent.CFrame +Vector3.new(0,-20,0)

wait(Interval)

Waited = 0

end

end

That SHOULD work.

User Avatar

JAKE BOI

Lvl 2
4y ago

What else can I help you with?