I want to make a system that makes you sit on a seat and changes your face to whatever then when you press E or button X then it should remove you from the seat changing your face back to normal
the face changing works however the detecting of the key doesn’t want to work as well as I don’t know how to reverse the face id back to normal and remove the player from seat! image|605x415
I have looked all over the developer hub but non of it works and I tried doing the numbers still no
proximityPrompt = script.Parent
local seat = proximityPrompt.Parent
local UserInputService = game:GetService("UserInputService")
seat:GetPropertyChangedSignal("Occupant"):Connect(function(player)
if seat.Occupant then
proximityPrompt.Enabled = false
else
proximityPrompt.Enabled = true
end
end)
proximityPrompt.Triggered:Connect(function(player)
seat:Sit(player.Character.Humanoid)
local userface = player.Character.Head.face.Texture
player.Character.Head.face.Texture = "rbxassetid://22741736"
player.Character.Humanoid.JumpPower = 0
------------------------------------------------------
-- below bit donesn't work. me dont know why
-- also detects key and removes player by jumping idk
----------------------------------------------------
if UserInputService:IsKeyDown(Enum.KeyCode.E) then
player.Character.Humanoid.Jump = true
end
end)