I have reviewed a few articles on this platform, but none of the solutions work.
Script:
local Players = game.Players:GetPlayers()
local Player = game.Players.LocalPlayer
local Map = game.Workspace.Map:FindFirstChildWhichIsA("Model")
for i, v in pairs(Players) do
if v.Team == game.Teams["MALWARE"] then
if v.Character ~= nil then
local Character = v.Character
Character:FindFirstChildOfClass("Humanoid").Sit = false
v.Character.HumanoidRootPart.CFrame = Map.MALWARESpawn.CFrame + Vector3.new(0,5,0)
end
end
end
end
This snippet (pictured) under the Seat instance says to either force the player to jump or destroy the weld that is created by the seat. Additionally, there exists a “Seated” HumanoidStateType which you can manually re-set to a different state.
local player = game.Players.LocalPlayer
local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
if humanoid.SeatPart then
humanoid.Jump = true
end
Works well to an extent. I have done a remote event and followed your instructions. However, the physical object of the seat gets teleported along with the player, and the player can “re-seat” themselves if they move around. This is particularly strange as I call the remote event for all players prior to the line where players are teleported.
Try this code the extra line will destroy the SeatPart that gets sent along with the player.
local player = game.Players.LocalPlayer
local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
if humanoid.SeatPart then
humanoid.Jump = true
humanoid.SeatPart:Destroy()
end