For example: When the player joins they go through a NoCollide brick that sets their walkspeed to 0 (which means they cannot move).
How can you do this in Lua?
To change a players' walkspeed to 0, set the WalkSpeed property of their character's Humanoid to 0.
local part = script.Parent part.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then player.Character.Humanoid.WalkSpeed = 0 -- set walkspeed end end)