I am new here so forgive me if I am doing anything wrong. Below is a script so when you touch a block it plays music. The script is very glitchy when someone is standing on the block when afk , it cuts the music and keeps replaying,how do I fix this.
Sorry if my explanation is all over the place.
local sound = Instance.new("Sound", Workspace)
sound.Pitch = 1
sound.SoundId = "rbxassetid://902587196"
sound.Volume = 1
sound.Looped = false -- If you want the song to repeat after the song is done
script.Parent.Touched:connect(function()
sound:play()
end)

1 comment
Thank you man.