Note: This was my first Local Script, I made a test script and was able to confirm that properties can be changed locally, so I don’t know why this doesn’t work.
Well because the script is added each time the client enters the game? You’re just connecting it for each client, not even checking if its a player nor the player that touched the part.
Try this:
local Default = workspace.MusicSaves:WaitForChild("DefaultMusic")
local DefaultPlaylist = workspace.MusicSaves.Default:getChildren()
local Underground = workspace.MusicSaves:WaitForChild("UndergroundMusic")
local UndergroundTrack = workspace.MusicSaves.Underground
local birds = workspace.Misc.AmbientBirds
local sea = workspace.Misc.SeaAmbience
--default
Default.Touched:Connect(function(otherPart : Part)
if not otherPart.Parent:FindFirstChildOfClass("Humanoid") then return end
if otherPart.Parent.Name ~= game.Players.LocalPlayer.Name then return end
workspace.MusicSaves.Default.PlaybackSpeed = 1
DefaultPlaylist.PlaybackSpeed = 1
workspace.MusicSaves.Default.Script.Enabled = true
UndergroundTrack.PlaybackSpeed = 0
workspace.Misc.AmbientBirds.PlaybackSpeed = 1
workspace.Misc.SeaAmbience.PlaybackSpeed = 1
end)
--underground
Underground.Touched:Connect(function(otherPart : Part)
if not otherPart.Parent:FindFirstChildOfClass("Humanoid") then return end
if otherPart.Parent.Name ~= game.Players.LocalPlayer.Name then return end
workspace.MusicSaves.Default.PlaybackSpeed = 0
DefaultPlaylist.PlaybackSpeed = 0
workspace.MusicSaves.Default.Script.Enabled = false
UndergroundTrack.PlaybackSpeed = 1
birds.PlaybackSpeed = 0
sea.PlaybackSpeed = 0
end)