this is script
local Goo = script.Parent local team = BrickColor.new("Dark stone grey") local infect = game.ReplicatedStorage.GetInfect local waitd = false Goo.Touched:Connect(function(hit) if not waitd then local plr = game.Players:GetPlayerFromCharacter(hit.Parent); if plr then plr.TeamColor = team end infect:FireClient(plr) waitd = true end end)
this is a local script
local infect = game.ReplicatedStorage.GetInfect local sound = script.Sound infect.OnClientEvent:Connect(function() sound.Playing = true end)
In server script line 12, the FireClient()
event need a necessary argument, player, so that the event knows which player it should fire the replicated event to.
If you are trying to fire the event to the player who hit the 'goo', I suggest you putting game.Players:GetPlayerFromCharacter(hit.Parent)
inside the FireClient()
bracket. Or simply make a variable.
If you are trying to fire the event to ALL clients, use FireAllClients()
instead.