I don’t know if I’m in the right topic but hey
Currently, I want players when they join my game to sit right in the chair and have no way out of the chair, much like Breaking Point.
Here is my script that I did but it doesn’t work
I don’t know if I’m in the right topic but hey
Currently, I want players when they join my game to sit right in the chair and have no way out of the chair, much like Breaking Point.
Here is my script that I did but it doesn’t work
You could disable jumping for the humanoid:
humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
There’s alot of solutions which you can search up on the devforum if you want to.
--Script inside StarterCharacterScripts
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local char = script.Parent
local Seat = ReplicatedStorage:WaitForChild("Seat")
function ForceSeat(seat, humanoid, timeout)
local start = os.time()
local Success
repeat
seat:Sit(humanoid)
Success = (humanoid.SeatPart == seat)
if not Success then
task.wait(.01)
end
until Success or os.time()-start > timeout
end
local Humanoid = char:WaitForChild("Humanoid")
if not Humanoid then warn("Humanoid wasn't found") return end
local clone = Seat:Clone()
clone.Name = "clone"
clone.Position = Vector3.new(63, 71, 29)
clone.Parent = workspace
Humanoid.UseJumpPower = true
Humanoid.JumpPower = 0
--if it errors, we try again until the timeout(5) is reached
--ignore studio errors(param is not a Humanoid or humanoid is dead), they have no impact on gameplay
ForceSeat(clone, Humanoid, 5)