Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How would you make this script move slower?

Asked by
steev 0
11 years ago

This is a model script and i want the model to move slowly upwards and i also want it to play a sound (only once) when the button is pressed.

Any help?

01local model = game.Workspace["Door4"]; -- The model you want to move up
02local increment = 0.5 --The amount you want it to go up by each time
03local max = 10 --The studs you want to go up by
04local Button = script.Parent.ClickDetector --Change this to the ClickDetector.
05local closed = true
06local isMoving = false
07 
08function onClick()
09    if isMoving == false then
10        isMoving  = true
11            if closed then
12                move = increment
13            else
14                move = -increment
15            end
View all 25 lines...

Answer this question