I'm having this annoying problem with my script that when run, it says on output "Scare is not a member of ScreenGui" (btw scare is a sound). This only happens ingame/serverside. Scare is clearly inside of Screen Gui, and I even created a local server to test this and it says this too! In studio testing it works, though, but I don't know why. Here's to show that it's actually in Screen Gui: https://i.gyazo.com/b2822be80948558e958a048f01f7553a.png
I don't know why it only happens in-game, and why "scare" cannot be found. What's wrong?
Here's my script:
local herobrine = workspace.HerobrineJumpRoom.HerobrineJumpscare
local anim = herobrine.Humanoid:LoadAnimation(workspace.HerobrineJumpRoom.HerobrineJumpscare.Head.JumpscareAnim)
script.Parent.Scare:Play()
anim:Play()
wait(0.1)
script.Parent.Scream:Play()
wait(0.82)
script.Parent.Whoosh:Play()
wait(0.3)
script.Parent.Punch:Play()
wait(0.2)
script.Parent.black.BackgroundTransparency = 0
for i = 0, 1, 0.2 do
script.Parent.black.white.BackgroundTransparency = i
wait()
end
wait(1)
game.Players.LocalPlayer.PlayerGui.Camera:Destroy()
game.Workspace.CurrentCamera:Destroy()
wait(1)
script.Parent.Eerie:Play()
for i = 1,0,-0.02 do
script.Parent.black.Died.TextTransparency = i
script.Parent.black.Text.TextTransparency = i
wait(0.05)
end
wait(3)
for i = 0,1,0.02 do
script.Parent.black.Died.TextTransparency = i
script.Parent.black.Text.TextTransparency = i
wait(0.05)
end
script.Parent.black.Died.TextTransparency = 1
script.Parent.black.Text.TextTransparency = 1
Ignore the whole "herobrine" thing. I did it as a joke.
