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

This is what i got for a freeze team only script is it correct?

i have tried doing this

game.Teams["Team1"]:GetPlayers.LocalPlayer.WalkSpeed = 0 wait(2) game.Teams["Team1"]:GetPlayers.LocalPlayer.WalkSpeed = 16

still did not work and i dont know what else to do

8 comments

0

the wait(2) should be inbetween both of the text

0

Anything in the output?

0

I will check

0

function arguments expected near '.'

1

...Eh?

0

Wth, I am confused like.. a LOT.. u are going into teams, getting players, finding localplayer, searching for walkspeed in Players?

0

its because to freeze players u need to walkspeed them 0 so they dont move.. And like i said im a bad lua scripter so maybe if you can help me and not judge me on how i code.. yes i know im bad

0

You should probably wiki these things: LocalPlayer, FilteringEnabled, LocalScripts, ServerScripts, Teams, GetPlayers

1 answer

local Players = game:GetService('Players')
local Teams = game:GetService('Teams')

local Team1Color = BrickColor.new('Bright red') -- change this to your Team1 color

for _, v in pairs(Players:GetChildren()) do 
	if v:IsA('Player') and (v.Character) then 
		if (v.TeamColor == Team1Color) then 
			local humanoid = v.Character.Humanoid
			humanoid.WalkSpeed = 0
			
			wait(2)

			humanoid.WalkSpeed = 16
		end
	end
end

2 comments

0

this checks if a player's teamcolor matches with Team1Color using a loop

0

Holy crap dude thanks! Maybe can you teach me how to lua code? I need much help doing it so itll be appreciated i can seem to figure out how to just like code its just i dont understand it

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