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

in this code below, the gui doesn't appear??

Asked by 5 years ago
01local tool = script.Parent
02local event = game.ReplicatedStorage.StrengthEvent
03local debounce = false
04local plr = game.Players.LocalPlayer
05local waitGui = plr.PlayerGui:WaitForChild("ScreenGui")
06local gui = waitGui.Strength.TextTransparency
07 
08tool.Activated:Connect(function()
09    if not debounce then
10        debounce = true
11        for i = 1, 0, .1 do
12            gui = i
13            wait()
14        end
15        wait()
View all 24 lines...

the gui doesn't appear... im not sure what to do e.e and i had to expand the title.

0
i think im overusing waits though lol queue0I 5 — 5y
0
Maybe you want to accept my answer? If you could, I'm appreciated. :)) LinavolicaDev 570 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Your code has several problems.

  1. gui = waitGui.Strength.TextTransparency, well use waitGuit.Strength.

  2. for i = 1, 0, .1 do, you cannot count down from 1 to 0 per 0.1.

I fixed your code; Hope it helps.

01local tool = script.Parent
02local event = game.ReplicatedStorage.StrengthEvent
03local debounce = false
04local plr = game.Players.LocalPlayer
05local waitGui = plr.PlayerGui:WaitForChild("ScreenGui")
06local gui = waitGui.Strength
07 
08tool.Activated:Connect(function()
09    if not debounce then
10        debounce = true
11        for i = 0, 1, .1 do
12            gui.TextTransparency = i
13            wait()
14        end
15        wait()
View all 24 lines...
0
ah thanks, it definitely helps. i just started coding a week ago :) queue0I 5 — 5y
Ad

Answer this question