So... Basically, the context of my problem is that the players are in the lobby and when they are teleported to their seats, their movement is also blocked. They can't walk or jump. Actually, that's how it should be, but when they are teleported, they can still jump, regardless of what I do. I just want the player to stay still in their seat... how should I solve this?
local function teleportAndFreeze()
local allPlayers = Players:GetPlayers()
local seats = SeatsFolder:GetChildren()
local seatIndex = 1
for _,p in ipairs(allPlayers) do
local char = p.Character
if char and char:FindFirstChild("HumanoidRootPart") and char:FindFirstChild("Humanoid") then
local hum = char.Humanoid
local role = p:GetAttribute("Role")
hum.Sit = false
local tempSeat = Instance.new("Seat")
tempSeat.Anchored = true
tempSeat.CanCollide = false
tempSeat.Transparency = 1
tempSeat.CFrame = (role=="Narrador") and (NarratorSeat.CFrame + Vector3.new(0,3,0)) or (seats[seatIndex].CFrame + Vector3.new(0,3,0))
tempSeat.Parent = Workspace
if char:FindFirstChild("HumanoidRootPart") then
char.HumanoidRootPart.CFrame = tempSeat.CFrame
end
hum.Sit = true
hum.WalkSpeed = 0
hum.JumpPower = 0
hum.PlatformStand = false
p:SetAttribute("TempSeat", tempSeat)
if role ~= "Narrador" then
seatIndex = seatIndex + 1
if seatIndex > #seats then seatIndex = 1 end
end
end
end
** You are now Level 1! **