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

How would I Enable Sounds on a Part when the Part is Enabled?

Lets get to the point. I have a part that either disables or enables the visibilty of a part via script when clicked

To turn on the Laser

local Player = game.Players.LocalPlayer


script.Parent.ClickDetector.MouseClick:connect(function(Player)
	game.Workspace.Damage.Transparency = 0
	game.Workspace.Damage.Script.Disabled = false
end)

Audio

function Audio(Sound)
	if game.Workspace.Damage.Transparency == 0 then
		Sound:Play()
	end
end

local Sound = game.Workspace.Damage.Sound

How would I make it so a Sound will play when the part is visible..

Also for extra help how would you only make it require one button to enable/disable the laser

Thank you for helping!!

1 answer

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