Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is this script that is supposed to play a sound based on a value not working?

Asked by 8 years ago

This script is supposed to detect when a value inside the player becomes true, and then play a sound. However, the script does nothing, and output gave me nothing.

Can someone please help me?

Here's the script:

local Player = script.Parent.Parent.Parent
local PlayerGui = Player:WaitForChild("PlayerGui")
local Thingy = PlayerGui.Notifications:WaitForChild(script.Parent.Name)

while wait(0.1) do
    if Thingy.Value == true then
        script.Parent:Play()
        Thingy.Value = false
    end
end

1 answer

Log in to vote
0
Answered by 8 years ago

Nevermind. I used a different method.

Ad

Answer this question