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

How could I make a pop up gui appear when you click with a tool?

Asked by 4 years ago

Basically, I am working on a simulator, I'm very new to scripting and wannt help on making a pop up effect gui when you left click with any tool. Just like in any simulator when you click with your tool a pop up gui shows up, an emoji and the amount of money you made with that click or whatever curency you are using.

Here's what I want but with this emoji ?

https://gyazo.com/abb06c4e60197180fd19eb7423a0cbd8

This is my tool -

https://gyazo.com/681705835c3877b9c9e1f8d38b5ad69a

In case you guys are wondering I'm working on a Battery Sim, once you click with the battery in hand you gain volts, those volts you can sell for money

Thanks for helping :)

0
simulator games are bad don't make them Andy_Wirus 72 — 4y
0
it's just one of those games I feel comfortable compared to others :D Twitch_Aitchtv 0 — 4y

1 answer

Log in to vote
0
Answered by
Narunzo 172
4 years ago

This isn't a request site do some research before you ask for help. This script will work though you will have to change a few things though.

--Get PlayerGui and Your Gui
local Player = game:GetService("Players")
local PlayerGui = Player:WaitForChild("PlayerGui")
local Gui = PlayerGui:WaitForChild(YourGui)

--Variable(s)
local Tool = script.Parent
local Frame = Gui:FindFirstChildWhichIsA("Frame")
local Debounce = false

--Function(s)
local function Activate()
    if not Debounce then
        Debounce = true
        Frame.Visible = true
        wait(0.1)
        Frame.Visible = false
        Debounce = false
    end
end

--Event(s)
Tool.Activate:Connect(Activate)

You may have to change Frame to the type of Gui element you used though.

0
I have been doing research thanks, this was my last resort, anyways, thanks for the help Twitch_Aitchtv 0 — 4y
0
Can you mark this as the answer? Or was this not what you meant? Narunzo 172 — 4y
Ad

Answer this question