Hello, today I was making a system that forces player’s to sit into a random seat, the issue I encountered is that, when the player jump’s they exit the siting the jumping animation and they just float awkwardly while being welded.
How would I prevent this kind of behaviour?
Here’s the video:
And here’s the code:
local SpawnPoints = workspace.Boat.Spawns:GetChildren()
local StartCutscene = require(game:GetService("ServerScriptService").StartCutscene)
local MPS = game:GetService("MarketplaceService")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local humanoid = character:WaitForChild("Humanoid")
local HRP = character:FindFirstChild("HumanoidRootPart")
wait(.1)
for _,v in workspace.Boat.Main.BoatParts.Seats:GetChildren() do
if v.Occupant == nil then
v:Sit(humanoid)
local Weld = Instance.new("Weld")
Weld.Parent = v
Weld.Part0 = v
Weld.Part1 = HRP
Weld.C1 = CFrame.new(0,-1,0)
end
end
task.spawn(function()
StartCutscene.StartBoatCutScene()
end)
end)
end)
I have tried using Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping,false)