Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

how do i give certain teams different walk speeds and other features?

Does anyone know how or have a script on how to change the walk speed for a certain team? i’m also looking for a way to change the walking animation of that team. i’ve tried looking everywhere but i can’t find any answers.

2 answers

Whatever script you use for them to change teams, add the lines to change their walkspeed. It’s kinda hard to tell you exactly what you do if you haven’t posted any scripts you use. Do you use a script for them to change teams?

Here's a script I wrote that should do what you want. I'll break down each step of it and what it does.

--Configuration for the teams, change the stuff in quotation marks to your team names
local Teams = {
	["Red Team"] = {
		WalkSpeed = 20
	},
	["Blue Team"] = {
		WalkSpeed = 24
	}
}

--A player joined the game
game:GetService("Players").PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		--The player's character loaded, let's check what team they're on
		local Humanoid = character:WaitForChild("Humanoid") --Wait for the character's humanoid to load
		if not Teams[player.Team.Name] then
			--The player was on an unknown team, let's write a warning in the console
			warn(player.Name .. " was on a team that was not set up! (" .. player.Team.Name ..")")
		end
		Humanoid.WalkSpeed = Teams[player.Team.Name].WalkSpeed --Update the player's WalkSpeed
	end)
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.