Proximity Promt seat script problems

So basically i decided to make a use of proximity promt to sit me on seat and teleport me out.
Simple. Turns out it all works fine but once i put it inside my vehicle and decide to click one of key of WASD my vehicle goes insane. Whats the matter? I think it shouldnt do that once i am normally seated in.

What could be the reason?
If there will be a need i will also send here a script source
Thank you for your help in advance

after anchoring a seat it seem to not do that so might be a problem that it has to do with a-chassis that is installed

The problem might be in your tank, there isn’t any proximity prompt issues rlly. Can you send your source code that seats the player on the seat.

local proximityPrompt = script.Parent
local seat = proximityPrompt.Parent
if seat.Occupant then
proximityPrompt.Enabled = false

proximityPrompt.Enabled = true

seat.Value.Value = player.Name
player.Character.Humanoid.JumpPower = 1

local player = seat.Value.Value
local plr = game:GetService(“Players”):FindFirstChild(player)
–if seat.Occupant ~= seat.Value.Value then
seat.Value.Value = “”
plr.Character.HumanoidRootPart.CFrame = plr.Character.HumanoidRootPart.CFrame *, 0, 0))
plr.Character.Humanoid.JumpPower = 50

Your script is fine, it’s pretty much the issue with constraints and with the chassis. Didn’t you mention it happens when you press WASD? check the source code that listens to the input and moves the vehicle.

I found out the reason. Its not the chassis but the seat.Chanched function has no checks so if I click WASD my Value got wiped cuz seat.Chanched is triggered for whatever that changes seats properties. Therefore I just added lines to make sure that Value stays and checks if player decided to leave a seat or not so it wont teleport him for anything else but only if he jumps out.

Anyway there is one thing I wonder if you know. Do you know how I can rotate the character on top of teleporting him?

Player.Character:SetPrimaryPartCFrame(Player.Character.PrimaryPart.CFrame * CFrame.Angles(math.rad(x),math.rad(y),math.rad(z)))

Change X,Y,Z.

X = Angle to rotate on X axis
Y = Angle to rotate on Y axis
Z = Angle to rotate on Z axis

1 Like

Yo thank you so much :slight_smile: