I’m trying to make a script that when the player clicks with his mouse on the computer (In that case, a part that simulaters de computer) to open a GUI with the pc desktop, but for some reason that idk, it’s not working
This is the script:
local Boot = game.StarterGui.PC1:WaitForChild(“Frame”)
function onClicked()
Boot.BackgroundTransparency = 1
wait(0.1)
Boot.BackgroundTransparency = 0.95
wait(0.1)
Boot.BackgroundTransparency = 0.90
wait(0.1)
Boot.BackgroundTransparency = 0.85
wait(0.1)
Boot.BackgroundTransparency = 0.80
wait(0.1)
Boot.BackgroundTransparency = 0.75
wait(0.1)
Boot.BackgroundTransparency = 0.70
wait(0.1)
Boot.BackgroundTransparency = 0.65
wait(0.1)
Boot.BackgroundTransparency = 0.60
wait(0.1)
Boot.BackgroundTransparency = 0.55
wait(0.1)
Boot.BackgroundTransparency = 0.50
wait(0.1)
Boot.BackgroundTransparency = 0.45
wait(0.1)
Boot.BackgroundTransparency = 0.40
wait(0.1)
Boot.BackgroundTransparency = 0.35
wait(0.1)
Boot.BackgroundTransparency = 0.30
wait(0.1)
Boot.BackgroundTransparency = 0.25
wait(0.1)
Boot.BackgroundTransparency = 0.20
wait(0.1)
Boot.BackgroundTransparency = 0.15
wait(0.1)
Boot.BackgroundTransparency = 0.10
wait(0.1)
Boot.BackgroundTransparency = 0.05
wait(0.1)
Boot.BackgroundTransparency = 0
wait(0.1)
end
workspace.PcInteractive.ClickDetector.MouseClick:connect(onClicked)