local tool = script.Parent local event = game.ReplicatedStorage.StrengthEvent local debounce = false local plr = game.Players.LocalPlayer local waitGui = plr.PlayerGui:WaitForChild("ScreenGui") local gui = waitGui.Strength.TextTransparency tool.Activated:Connect(function() if not debounce then debounce = true for i = 1, 0, .1 do gui = i wait() end wait() event:FireServer() wait(2) for i = 1, 0, -.1 do gui = i wait() end debounce = false end end)
the gui doesn't appear... im not sure what to do e.e and i had to expand the title.
Your code has several problems.
gui = waitGui.Strength.TextTransparency
, well use waitGuit.Strength
.
for i = 1, 0, .1 do
, you cannot count down from 1
to 0
per 0.1
.
I fixed your code; Hope it helps.
local tool = script.Parent local event = game.ReplicatedStorage.StrengthEvent local debounce = false local plr = game.Players.LocalPlayer local waitGui = plr.PlayerGui:WaitForChild("ScreenGui") local gui = waitGui.Strength tool.Activated:Connect(function() if not debounce then debounce = true for i = 0, 1, .1 do gui.TextTransparency = i wait() end wait() event:FireServer() wait(2) for i = 1, 0, -.1 do gui.TextTransparency = i wait() end debounce = false end end)