When I play the game in studio, the local script works perfectly fine. But, in the actual game it doesn't work. Also, the local script is in a ScreenGui, and the ScreenGui is activated when you click on a certain part. Heres the scripts:
Script that activates the GUI when you click on a certain part:
function boop(Player)
if not Player.PlayerGui:FindFirstChild("Gui") then
local gui = script.Gui:clone()
gui.Parent = Player.PlayerGui
gui.LocalScript.Disabled = false
end
end
script.Parent.ClickDetector.MouseClick:connect(boop)
Local Script:
local save = script.Parent:WaitForChild("save")
local glitch = script.Parent.glitchbackground:WaitForChild("glitch")
local glitchbackground = script.Parent:WaitForChild("glitchbackground")
local static = glitch.Static
script.Heal:Play()
wait(5)
save.ImageTransparency=1
glitchbackground.ImageTransparency=0
glitch.ImageTransparency=0
script.Sound:Play()
wait(2)
script.Static:Play()
wait(0.5)
script.Static.Volume=0.1
static.ImageTransparency=0.9
wait(0.5)
script.Static.Volume=0.2
static.ImageTransparency=0.8
wait(0.5)
script.Static.Volume=0.3
static.ImageTransparency=0.7
wait(0.5)
script.Static.Volume=0.4
static.ImageTransparency=0.6
wait(0.5)
script.Static.Volume=0.5
static.ImageTransparency=0.5
wait(0.5)
script.Static.Volume=0.6
static.ImageTransparency=0.4
wait(0.5)
script.Static.Volume=0.7
static.ImageTransparency=0.3
wait(0.5)
script.Static.Volume=0.8
static.ImageTransparency=0.2
wait(0.5)
script.Static.Volume=0.9
static.ImageTransparency=0.1
wait(0.5)
script.Static.Volume=1
static.ImageTransparency=0
wait(2)
script.Static:Stop()
static.ImageTransparency=1
save.ImageTransparency=1
glitchbackground.ImageTransparency=1
glitch.ImageTransparency=1
script.Parent.Frame.BackgroundTransparency=0
script.Sound:Stop()
script.Parent.intro.Disabled=false

1 comment
What should it do? What is not functioning correctly? That would be very helpful when answering your questions