#Force sit.

38 messages · Page 1 of 1 (latest)

west bear
#

How do I force players to sit in the seats? When they join the game. So when players join. They be on the seat.

kind sorrel
#

that'll move them at the beginning of the game whatever place you want and the anchor will make them not able to move

#

for the actual sit part idk

west bear
kind sorrel
#

how you define HumanoidRootPart depends on the script if you have one

#

but you'll probably only need to say this at the beginning:

local Players = game:GetService("Players")
local player = Players.LocalPlayer
local HumanoidRootPart = player.Character:WaitForChild("HumanoidRootPart")

west bear
#

I somehow did it but didnt seem to work

#
local player = Players.LocalPlayer
local HumanoidRootPart = player.Character:WaitForChild("HumanoidRootPart")
local Seat = game.Workspace.Building1["Swan ride 2"]["All Seats"].Seat1

if player then
    HumanoidRootPart.Anchored = true
    HumanoidRootPart.CFrame = Seat.CFrame
end 

kind sorrel
#

maybe something like:

local function onCharacterAdded(character) to check then you add the rest of the code

swift cairn
# west bear How do I force players to sit in the seats? When they join the game. So when pla...

i did this 2 learn myself n i found this was the easiest way to do it: :)

local seat = game.Workspace.Building1["Swan ride 2"]["All Seats"].Seat1

game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local hum = char:WaitForChild("Humanoid")
if char:FindFirstChild("Humanoid") then
seat:Sit(hum)
char.HumanoidRootPart.Anchored = true --or u could do: hum.JumpPower = 0 hum.WalkSpeed = 0
end
end)
end)

kind sorrel
swift cairn
west bear
#

Its funny that im floating in the air

kind sorrel
swift cairn
#

local seat = game.Workspace.Building1["Swan ride 2"]["All Seats"].Seat1

game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local hum = char:WaitForChild("Humanoid")
if char:FindFirstChild("Humanoid") then
seat:Sit(hum)
hum.JumpPower = 0
hum.WalkSpeed = 0
end
end)
end)

#

i had that problem too

kind sorrel
#

lol

swift cairn
#

local seat = workspace.car2.carseat

game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local hum = char:WaitForChild("Humanoid")
if char:FindFirstChild("Humanoid") then
seat:Sit(hum)
char.HumanoidRootPart.Anchored = true
end
end)
end)

kind sorrel
#

@west bear also if the issue's been solved mark this post as solved

snow cairn
#

You can do Seat:Sit(hum: Humanoid)

#

The hum would be your players Humanoid

west bear
#

So I coud've done that?

snow cairn
west bear