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

Platform not moving after pressing button and not printing e, so i know it isn't running the rest?

Asked by 2 years ago
local y = script.Parent.CFrame.Y
local part = script.Parent
local button = workspace.Button2.button2.scriptpart2
local e = 4
button.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild('Humanoid') then
        repeat wait() until button.Touched 
            while true do
            repeat wait() until e < 1
                part.CFrame = CFrame.new(36, y + 0.05, -36)
            e = e - 1
            print(e)
            wait(0.05)
            repeat wait() until e > 9
                part.CFrame = CFrame.new(36, y - 0.05, -36)
            e = e + 1
            print(e)
                end

            end
        end
)
0
`repeat wait() until e < 1` does not pass. `e` is 4 and 4 is not smaller than 1. `e`’s value only change **after** the loop. SuperLittleAdmin 257 — 2y

Answer this question