All players effected by script issue

My goal is to have my script run when a player changes to the team. Currently I have 2 scripts, one that fires a server remote event, and the other that runs everything else;

Local Script in Character model;

 local team = game.Teams.Tagger
  local Player = game.Players.LocalPlayer

  team.PlayerAdded:Connect(function(Player)
	
	game.ReplicatedStorage.TaggerChange:FireServer(Player)

  end)

Script in ServerScriptService;

team = game.Teams.Tagger
smoke = game.ReplicatedStorage.ParticleEmitter:Clone()
anims = script.Animate
oldanims = script.Parent.Animate


game.ReplicatedStorage.TaggerChange.OnServerEvent:Connect(function(Player)


	print(Player.Name.." has joined the team")
	
	Player.Character.ScaleTo(Player.Character, 2)
	
	local hum = Player.Character:FindFirstChildOfClass("Humanoid")
	local ws = hum.WalkSpeed
	local jh = hum.JumpHeight

	oldanims.Parent = game.ReplicatedStorage
	anims.Parent = script.Parent
	anims.Enabled = false
	anims.Enabled = true

	hum.WalkSpeed = 0
	smoke.Parent = Player.Character.PrimaryPart
	wait(1)
	
	wait(2)
	hum.WalkSpeed = 60
	hum.JumpHeight = 24
	Player.Character:WaitForChild("MultipleJump").Enabled = false
	Player.Character:WaitForChild("FallDamageRagdoll").Enabled = false
	Player.Character:WaitForChild("Dash").Enabled = false
	Player.Character:WaitForChild("RedAbil").REDDash.Enabled = true
	Player.PlayerGui.SprintGui.Parent = game.ReplicatedStorage
	smoke.Enabled = false
	wait(3)
	smoke:Destroy()

end)

I can’t find the reason to why every player in the game is effected by the script please help

The Player variable is used twice in the character script, which could be causing issues.

2 Likes

but no matter which one i put the variable in, it does the same thing. I put it in the function alone and removed it from the fireserver and it still effected all the players. and vise versa

1 Like

i figured it out, i just put the entire script in one (i didn’t know how to before, so i used remote events)