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

Using a GUI to make a local notification?

Asked by
v3c3 0
9 years ago

Say a person clicks a button on a gui and I want to make a notification gui to appear on their screen for a certain amount of time. Would I use a local script and spawn a GUI in their playergui folder or can I just use a regular script. If I can how would I do that?

I assume I can just use instance so would I be able to do it like this..

button = script.Parent
ting = false

button.MouseButton1Click:connect(function(click)
    if ting == false then
        ting = true
        M = Instance.new("Frame")
        M.Parent = click.Parent.PlayerGui
        --gui customization here
        --load some stuff here
        --remove notification here
    end
end)

and so on and so forth. Basically what I'm asking is how to make a local gui notification.

Thanks for any replys

1 answer

Log in to vote
0
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
9 years ago

Within that script, you can parent an already created GUI (Have a path possibly lead to a descendant of the current script), or you can create the GUI within the script (Setting each and every property which is a bit of a hassle). Add a wait(5), then use the Destroy method to remove it from the PlayerGui. This can be a local script. Also, just a reminder, make sure to set 'ting' to false at the end of the function, to properly use debounce.

Ad

Answer this question