[Solved] Hi, I am trying to script a system to play a sound when the GUI button is clicked. I got a part in the players torso that has an audio in the part. When the button is clicked I want the audio to play its sound. Also I need the sound to be heard from users nearby. What I keep running into is that when the sound plays it isn't the right player the sound is coming from. I need it to specify the player that clicks it.
Code I tried to get working
local Players = game:GetService("Players")
script.Parent.Parent.TextButton.MouseButton1Click:Connect(function(player)
player.Character.Head.TEST:Play()
end)

1 comment
I decided to put the sound in the player's head