Problem is when the player sitting it would teleport their seat

I have tried to code when player is sitting to stand up for the teleport can someone help? (I’m a new developer)

game.ReplicatedStorage.PTS.Teleport.OnServerEvent:Connect(function(PTSResponder,PTSRequester)
	if PTSResponder:GetRankInGroup(script.Parent.GroupNumber.Value) >= script.Parent.StaffRank.Value then
		PTSResponder.Character.HumanoidRootPart.CFrame = (PTSRequester.Character.HumanoidRootPart.CFrame*CFrame.Angles(0,math.rad(90),0)*CFrame.new(5+.2,0,0))*CFrame.Angles(0,math.rad(90),0)
	end
end)

hi,

when a player sits down a SeatWeld gets created, simply call an :Destroy() on it
image

Seat:FindFirstChild("SeatWeld"):Destroy()
1 Like