local sound = "rbxassetid://205050022" script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local player = game.Players:GetPlayerFromCharacter(hit.Parent) game.ReplicatedStorage.PlayMusic:FireClient(player,sound) end end)
y doesn't this work?
local sound = "rbxassetid://205050022" local Players = game:GetService("Players") script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local player = Players:GetPlayerFromCharacter(hit.Parent) end end)
Not really sure why it worked after i did it but all i did was add local Players = game:GetService("Players") and replaced game.Players with just Players "Players:GetPlayerFromCharacter(hit.Parent)" in this line GetPlayerFromCharacter