Greetings! I have been trying to learn scripting recently but I can’t figure this thing out.
This is what I’ve scripted to make the player press E with the proximityprompt and then get teleported out of the seat. The player gets teleported out, his custom seating animation stops playing and he stops seating.
The issue is that, when I press E to sit again It will make me sit where the player got teleported. Which means that when the player teleported, it teleported the Seat aswell. How can I solve this? Thank you.
script.Parent.Triggered:Connect(function(plr)
plr.Character.Humanoid.Sit = false
plr.Character.HumanoidRootPart.CFrame = CFrame.new(workspace.Bench.PromptExitPart1.Position)
workspace.Bench.PromptExit.ProximityPrompt.Enabled = false
local AnimationTracks = plr.Character.Humanoid:GetPlayingAnimationTracks()
for i, v in pairs(AnimationTracks) do
v:Stop()
end
end)