Its all good! I was in your position not long ago. Can you add TextLabel to the 3rd line next to screenGui?
This is what is inside my tool.
And, you do not need to add the Mouse.Button1Down as it will then show the gui even if the tool isnt equipped. So get rid of Line 2.
I put it as an Image Label rather than text.
Is this better? I noticed the tool and wait are underlined though
u should do a tool as a variable
local tool = game.StarterPack.Weight -- this could be different, idk ur path...
and correct form for wait is:
wait(1) --without a space
Thanks. I’ve done the whole script now but still nothing appears when I click.
Wait is underlined because in Wait, the w is not capital letter. it’s small letter.
wait(1)
remember the studio is case sensitive so de capitalize wait (is that even a word lol) and define some variables.
This sets it in StarterGui, every other player will see it but the player who clicks will not see it. It is better to don’t give scripts if you don’t know what it does.
Now from the topic, You can make a GUI from the PlayerGui visible, and then set any text you want.
also u should store ur tool into StarterPack(if u want to use it streight away) or ServerStorage(if u do that, then u need much more scripting later)
Sorry, i dont really understand what you said
So what am I supposed to do now? I am so confused lol.
This is what my tool and gui looks like:
And this is what my script looks like:
After you defined it you didnt drop down a line. Make sure to do that or the script wont function properly
Also, if the local script is a child of the tool, just define it like this:
local tool = script.Parent
tool.Activated:Connect(function()
-- the Gui script here
end)
local tool = script.Parent
tool.Activated:Connect(function()
game.StarterGui.ScreenGui.ImageLabel.Visible = true
wait(1)
game.StarterGui.ScreenGui.ImageLabel.Visible = false
end)
maybe like that?
It didn’t work. Something is stopping the image from showing.
Are there any issues in the output you could show us?
So basically i think you are saying that when you hold a certain tool and click, an image label would be visible.
You could do:
local db = true -- adding a denounce to prevent spam
tool = script.Parent -- making a variable for the tool.
tool.Activated:Connect(function()
if db == true then -- checking if you can click again
db = false -- making it so you can't click anymore
game.Players.LocalPlayer.PlayerGui.ScreenGui.ImageLabel.Visible = true -- making it visible (I am getting it from the localplayer)
wait(1)
game.Players.LocalPlayer.PlayerGui.ScreenGui.ImageLabel.Visible = false -- making it invisible
db = true -- after one second you would then be able to click again
end
end)