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

This text button script doesn't work?

Asked by 10 years ago

Here's the script

function onClick()
    local Message = Instance.new("Message") 
Message.Text = "Button Clicked!" 
Message.Parent= game.Workspace 
wait(5) 
Message:Remove() 
end

But for some reason It doesn't work. I'm a little nooby at gui's so...

1 answer

Log in to vote
0
Answered by 10 years ago
script.Parent.MouseButton1Click:connect(function()
    local Message = Instance.new("Message") 
Message.Text = "Button Clicked!" 
Message.Parent= game.Workspace 
wait(5) 
Message:Remove() 
end)

But the script in the button.

0
thanks PyccknnXakep 1225 — 10y
Ad

Answer this question