Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i make a transition go smoother?

I have this powerup, which needs to open a big door. But the door needs to go slow, but how do i make it go slower without changing the time (wait 8) between the frames?

HERE IS THE SCRIPT:

inuse = false recharge = 1

function onTouched(hit) if (hit.Parent:findFirstChild("Humanoid") ~= nil) and (inuse == false) and (hit.Parent:findFirstChild("Powerup") ~= nil) then if (hit.Parent.Powerup:findFirstChild("Heavy") ~= nil) then --checks if player is heavy inuse = true for i=1,14 do wait(8) script.Parent.Button.CFrame = script.Parent.Button.CFrame - Vector3.new(0, 0.05, 0) script.Parent.Door.CFrame = script.Parent.Door.CFrame - Vector3.new(0, -15, 0) --open door end wait(recharge - 0.35) for i=1,14 do wait(0.25) script.Parent.Button.CFrame = script.Parent.Button.CFrame + Vector3.new(0, 0.05, 0) script.Parent.Door.CFrame = script.Parent.Door.CFrame + Vector3.new(0, -15, 0) --close door end inuse = false end end end

script.Parent.Button.Touched:connect(onTouched)

if you could help I would apperciate it.

1 comment

0

use codeblock

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.