RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make it so that it tweens the gui that pops up, the gui tweens through transparency."
-- Local Script local button = script.Parent local gui = game.ReplicatedStorage:WaitForChild('YourGui') -- replace 'YourGui' with your Gui's name local tweenService = game:GetService('TweenService') local tweenInfo = TweenInfo.new(1) -- replace '1' with the duration you want for the tween local function toggleGui() for _, player in pairs(game:GetService('Players'):GetPlayers()) do local playerGui = player:WaitForChild('PlayerGui') if playerGui:FindFirstChild(gui.Name) then playerGui[gui.Name]:Destroy() else local newGui = gui:Clone() newGui.Parent = playerGui newGui.Enabled = true -- create a tween for the gui local tween = tweenService:Create(newGui, tweenInfo, {BackgroundTransparency = 0.5}) tween:Play() end end end button.MouseButton1Click:Connect(toggleGui)