Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Click Detector not bringing up GUI?

So I have a StarterGUI and I want to make it appear when you click the block. Here is what i have so far.

function guibuddy()
game.StarterGui.shovelbuddy.TextLabel.TextTransparency = 0
wait(3)
game.StarterGui.shovelbuddy.TextLabel.TextTransparency = 0.1
wait(0.05)
game.StarterGui.shovelbuddy.TextLabel.TextTransparency = 0.2
wait(0.05)
game.StarterGui.shovelbuddy.TextLabel.TextTransparency = 0.3
wait(0.05)
game.StarterGui.shovelbuddy.TextLabel.TextTransparency = 0.4
wait(0.05)
game.StarterGui.shovelbuddy.TextLabel.TextTransparency = 0.5
wait(0.05)
game.StarterGui.shovelbuddy.TextLabel.TextTransparency = 0.6
wait(0.05)
game.StarterGui.shovelbuddy.TextLabel.TextTransparency = 0.7
wait(0.05)
game.StarterGui.shovelbuddy.TextLabel.TextTransparency = 0.8
wait(0.05)
game.StarterGui.shovelbuddy.TextLabel.TextTransparency = 0.9
wait(0.05)
game.StarterGui.shovelbuddy.TextLabel.TextTransparency = 1
wait(0.05)
end

script.Parent.ClickDetector.MouseClick:Connect(guibuddy)

TextLabel is the GUI I want to appear and here is the TextLabel's beginning stats; active: false anchorpoint: 0,0 BGtransparency: 1 borderpixelwidth: 0 layoutorder:0 parent: shovelbuddy visible: true textscaled: true textTransparency: 1 textstroketransparency: 1 by the way, the screenGUI is enabled as well. In the UI editor, everything looked fine and it should have gone well. Any ideas?

4 comments

0

Its game.Players.LocalPlayer.PlayerGui

0

if its a local script. If not then use a for i,v loop.

0

Ok, but it is a regular script and it is under a brick in Workspace.

0

lemme post answer. I'm not that good but ima try.

1 answer

✓ Accepted answer

If you want everyone to see this GUI then you should do

function guibuddy()
for i,v in pairs(game.Players:GetChildren()) do -- gets every player in the Game
v.PlayerGui.shovelbuddy.TextLabel.TextTransparency = 0
wait(3)
v.PlayerGui.shovelbuddy.TextLabel.TextTransparency = 0.1
wait(0.05)
v.PlayerGui.shovelbuddy.TextLabel.TextTransparency = 0.2
wait(0.05)
v.PlayerGui.shovelbuddy.TextLabel.TextTransparency = 0.3
wait(0.05)
v.PlayerGui.shovelbuddy.TextLabel.TextTransparency = 0.4
wait(0.05)
v.PlayerGui.shovelbuddy.TextLabel.TextTransparency = 0.5
wait(0.05)
v.PlayerGui.shovelbuddy.TextLabel.TextTransparency = 0.6
wait(0.05)
v.PlayerGui.shovelbuddy.TextLabel.TextTransparency = 0.7
wait(0.05)
v.PlayerGui.shovelbuddy.TextLabel.TextTransparency = 0.8
wait(0.05)
v.PlayerGui.shovelbuddy.TextLabel.TextTransparency = 0.9
wait(0.05)
v.PlayerGui.shovelbuddy.TextLabel.TextTransparency = 1
wait(0.05)
end

script.Parent.ClickDetector.MouseClick:Connect(guibuddy)

I believe its the answer not really sure but try anyway

5 comments

0

This is going to be a single player game anyway. Ill try and see if it works

0

oooff alr i mean it should work. But it might cause some lag. If u want me to make another one ask

0

YES IT WORKED! Thanks WillBe_Stopped!

0

Consider using a loop

0

no pr0blem

This discussion is preserved as it was. New answers, comments, and votes are closed.