My script is a local script that changes the music when you touch a certain block. I have stored them in StarterPlayerScripts, and I had a friend join me and he had touched the block. It had changd the music for me as well, and I didn’t touch the object. How could I fix this?
local debounce
game.workspace.MusicChanger.Touched:Connect(function(hit)
local character = hit:FindFirstAncestorOfClass(“Model”)
if character then
local humanoid = character:FindFirstChild(“Humanoid”)
if not humanoid then
return
end
debounce = true
workspace.Music.SoundId = "rbxassetid://4786356457"
print("Checkpoint")
wait(5) -- change cooldown
debounce = false
end
end)
Script was made by @Operatik