Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

This discussion is preserved as it was. New answers, comments, and votes are closed.