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
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
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
this checks if a player's teamcolor matches with Team1Color using a loop
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.
8 comments
the wait(2) should be inbetween both of the text
Anything in the output?
I will check
function arguments expected near '.'
...Eh?
Wth, I am confused like.. a LOT.. u are going into teams, getting players, finding localplayer, searching for walkspeed in Players?
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
You should probably wiki these things: LocalPlayer, FilteringEnabled, LocalScripts, ServerScripts, Teams, GetPlayers