Custom mobile buttons for driving a car

  1. I want to make on screen buttons on a for mobile to make it easier to drive a car

  2. I’ve tried making gui buttons but they were delayed. I also
    Tryed using the ContextActionService but sense it was a local script
    I wasn’t sure how to us it.

PS I want to set the seat throttle with a on screen buttons.

this is my code

local ContextActionService = game:GetService("ContextActionService")
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local val = Player.Value


	
	local function handleAction(actionName, inputState, inputObject)
	
	if inputState == Enum.UserInputState.Begin then
		if val.Value ~= "nil" then
			local seat = workspace[val.Value][val.Value]
			print(seat)
					
			seat.Steer = 1
			seat.SteerFloat = 1
			print(seat.Steer)
		end
		
		end
		
end
-- Bind action to function
		

	ContextActionService:BindAction("Interact", handleAction, true, Enum.KeyCode.W, Enum.KeyCode.ButtonR1)

--- sense its a local script it cant set the steer on the seat thats my problom

For anyone Else trying to do this. I was able to put a normal script in a gui button and set the seat throttle to 1 when I press the button. And that works good without delay.

I’m curious on about how something like this work for Skateboards, is it possible?

I can’t see why it wouldn’t be possible if you give more info maybe I can help

Would you be able to share the model or code , I’ve been trying to do the same thing?

3 Likes