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

Why it's not working?

Asked by 10 years ago

here is my script:

script.Parent.MouseButton1Click:connect(function()  --- this function is working
    game.Workspace.GameMessage.Text="Carrots are fruits."
    Wait(3)
    game.Workspace.GameMessage.Text=""
end)

wait(11)
function divider()
    local div = game.Workspace.Divider.Door
    local fal = game.Workspace.False.Door

    div.Transparency= 0.75   ----- working
    div.CanColide= true
    wait(1)

    fal.Transparency= 0.5     ---- from here it doesn't work
    fal.CanCollide= false
    wait(5)
    fal.Transparency= 0
    fal.CanCollide= true

    wait(1)
    div.Transparency= 1
    div.CanColide= false
end

divider()

it is half working, thanks for all the helpers!

1 answer

Log in to vote
0
Answered by
wjs3456 90
10 years ago

It would be helpful if you specified what was working but I am assuming that the message part is messed up. Try:

script.Parent.MouseButton1Click:connect(function()
    m = Instance.new("Message", Workspace) 
        m.Text = "Carrots are fruits."
            wait(3) --Lua is case-sensitive
                m: Destory() --Destroys the message. Otherwise I think there would just be a blank message lingering there forever

Hope I was right, and this helps!

0
Still the same, and now the message is not removed KillSide 0 — 10y
Ad

Answer this question