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

Click Detector not bringing up GUI?

Asked by
Stycon 30
5 years ago

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?

0
Its game.Players.LocalPlayer.PlayerGui WillBe_Stoped 71 — 5y
0
if its a local script. If not then use a for i,v loop. WillBe_Stoped 71 — 5y
0
Ok, but it is a regular script and it is under a brick in Workspace. Stycon 30 — 5y
0
lemme post answer. I'm not that good but ima try. WillBe_Stoped 71 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

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

0
This is going to be a single player game anyway. Ill try and see if it works Stycon 30 — 5y
0
oooff alr i mean it should work. But it might cause some lag. If u want me to make another one ask WillBe_Stoped 71 — 5y
0
YES IT WORKED! Thanks WillBe_Stopped! Stycon 30 — 5y
0
Consider using a loop MadWorlds 84 — 5y
0
no pr0blem WillBe_Stoped 71 — 5y
Ad

Answer this question