How do i create a dismount script for a skateboard

Im currently in the process of making a skatepark, but i have little to no scripting knowledge, and everytime i get stuck one a skateboard, i have to reset to get off it.

robloxapp-20240720-1319586.wmv (5.0 MB)

Screenshot 2024-07-20 132144

I have tried looking up tutorials and searching on the dev forum, but so far ive found nothing

any types of help will be appreciated =) if requested, i could pay

What keeps the player specifically on the skateboard, is it welds?

Go to the skateboard localscript and replace this line marked in this image, find the onButtonChanged function:


and replace it with this:

local humanoid = Board.ControllingHumanoid
	
repeat
	task.wait()
	humanoid.Sit = not humanoid.Sit
until not Board:FindFirstChildOfClass("Motor6D")

your code should look like this
ex2
fully tested and it works for me (The dismount key is the backspace key, also this code works by chance but I couldn’t make any other solutions so whatever)

2 Likes

tysm man, helped and works succesfully

apologies if im taking up your time, but is there also a way to make the turning a little less stiff? as of right now, the turning is really slow

I looked in the skateboard localscript and there was no code related to modifying the turning of the skateboard so I think it’s just skateboard limitations

alr, thats fine but thanks for trying to help

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.