Hi there, I have never actually seen this been answered, so I’d like to see your best code for functions in which a player (if touched a checkpoint and joined a game) they will have their own sound play.
Yes, the ideal way of actually playing the sound is by cloning it to the PlayerGui, which I’ve already got covered - however an actual script for touching a checkpoint, changing teams, then playing a sound inside that team would be a good way to handle sound based on a player’s team location.
Anyways, here’s a more in depth POV:
The player will join the game on the lobby team, the sound for the lobby team will play.
The player will then touch a checkpoint.
Instead of being in a new area, the team’s sound will play (based on this layout);
If you have a solution or a good, clean code so that others can get their solution, please do reply!
I cant code it for you (I am injured) but you’ll want to fire a remote event to the client when the player changes to a team. You might use Player:GetPropertyChangedSignal(“Team”) and then check what player’s team is now and then fire a remote event and then have a local script somewhere in player and PlayLocalSound
although all of this sounds convoluted, I would just make zones using module zoneplus v2 and identify onplayerentered if player~=team1 then SoundService:PlayLocalSound(locationofsound)
game.Players.LocalPlayer:GetPropertyChangedSignal("Team"):Connect(function()
if game.Players.LocalPlayer.Team.Name == "Bright Orange" then -- change Bright Orange to whatever team name you want
game.Teams[game.Players.LocalPlayer.Team.Name].Song:Play()
end
end)