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