So, i'm making a game about skateboarding and when you fall, it plays breathing and heavy wind noises. I'm adding a part to the script that i thought would make the screen border black when you fall, but it doesn't work. Can you help me understand what is going wrong?
The code:
local humanoid = script.Parent
local isFalling = false
humanoid.FreeFalling:connect(function(falling)
isFalling = falling
if isFalling then
game.Workspace.Assets.breathing:Play()
game.Workspace.Assets.wind:Play()
script.Parent.Parent.Parent.wind.vignette:Clone()
else
script.Parent.Parent.Parent.wind.vignette:Destroy()
game.Workspace.Assets.breathing:Stop()
game.Workspace.Assets.wind:Stop()
end
end)

1 comment
You are cloning vignette, you need to set parent. If it's in playergui already enable/disable would be a bettter option