Hi, I have been having trouble on the sound effect where it is not playing, I have checked the sound and try medthods on this script but nothing works as planned. If you are wondering I was trying to make a script where when the proximity prompts is triggered it would make a sound effect. In other words it like a switch that makes sound effect every time it clicked. Please help me I am not a great scripture.
On the second script, you are trying to use the âTriggeredâ function on a part instance.
you should copy the ProximityPrompt variable from your other script, and do
ProximityPrompt.Triggerd
not
bulb.Triggered
it should look something like this
local bulb = script.Parent.Bulb
local sound = Instance.new("Sound")
local promt = bulb.ProximityPrompt -- Add this variable
sound.SoundId = '' -- Insert SoundId
sound.Parent = bulb
promt.Triggered:Connect(function() -- make the ProximityPrompt use the .Triggered function instead of the part instance
sound:Play(1)
end)