Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
Ecl0ox -7
6 years ago

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

0
the wait(2) should be inbetween both of the text Ecl0ox -7 — 6y
0
Anything in the output? theCJarmy7 1293 — 6y
0
I will check Ecl0ox -7 — 6y
0
function arguments expected near '.' Ecl0ox -7 — 6y
View all comments (4 more)
1
...Eh? TheeDeathCaster 2368 — 6y
0
Wth, I am confused like.. a LOT.. u are going into teams, getting players, finding localplayer, searching for walkspeed in Players? greatneil80 2647 — 6y
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 Ecl0ox -7 — 6y
0
You should probably wiki these things: LocalPlayer, FilteringEnabled, LocalScripts, ServerScripts, Teams, GetPlayers gmatchOnRoblox 103 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
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
0
this checks if a player's teamcolor matches with Team1Color using a loop awesomeipod 607 — 6y
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 Ecl0ox -7 — 6y
Ad

Answer this question