Giving out my bike system

4 months too late but I figure I might be able to help. First you need to put your guis in StarterGui, and then edit the server script inside of ServerScriptService. In the player added event just add this:

for i,v in pairs(game:GetService("StarterGui"):GetChildren()) do 
	v:Clone().Parent = player:WaitForChild("PlayerGui")
end

As for setting the spawn, you can just set the position or cframe of their character controller to wherver in the player added events. Make sure to remove the spawn it makes you have by default (I think it is set to 0,0,0?)

Like so:

character.CFrame = workspace.SpawnLocation.CFrame

and then remember to edit the respawn function:

while true do
	for i,v in pairs(workspace.Characters:GetChildren()) do
		if v.Position.Y < -64 then
			v.CFrame = workspace.SpawnLocation.CFrame 
		end
	end

	wait(0.1)
end

Hope this helps!

(Sorry for bumping the topic guys.)

3 Likes

I know I’m very late so I probably won’t get an answer but does anyone know how to remove the limit on how far you can go before getting teleported back to the spawn??

2 Likes

Whenever I try to edit the game, it says
“Failed to create key for RobloxStudioLauncherBeta.exe elevation policy: access is denied”

I was able to fix the issue by using another computer

does anyone know how to remove the limit on how far you can go before getting teleported back to the spawn?

Im pretty sure it was 250 studs

Does anyone have the script for a backflip and/or tailwhip, i’ve been having trouble making them.

1 Like

If you need some tricks I have them:
Nose Manual: local TRICK = {}

function TRICK.Create(self, character, char, bike)
local trick = {
Start = tick();
Length = 2;
}

function trick.UpdateBike(self)
	local alpha	= math.clamp((tick() - self.Start) / self.Length, 0, 1)
	local lerp	= -math.abs(2*alpha - 1)^4 + 1
	
	local offset	= bike.Frame.CFrame:toObjectSpace(bike.Forks.CFrame)
	
	bike.Frame.CFrame	= bike.Frame.CFrame:Lerp(bike.Frame.CFrame * CFrame.new(0, 1.4, 0) * CFrame.Angles(math.pi / -4, 0, 0), lerp)
	bike.Forks.CFrame	= bike.Frame.CFrame * offset
end

function trick.UpdateChar(self)
	
end

return trick

end

return TRICK

Indian Air:
local TRICK = {}

function TRICK.Create(self, character, char, bike)
local trick = {
Start = tick();
Length = 1;
}

function trick.UpdateBike(self)
	
end

function trick.UpdateChar(self)
	local alpha	= math.clamp((tick() - self.Start) / self.Length, 0, 1)
	local lerp	= -math.abs(2*alpha - 1)^2 + 1
	
	char.RightHand.CFrame	= char.RightHand.CFrame:Lerp(bike.Seat.CFrame * CFrame.new(0, 0.5, 0) * CFrame.Angles(-math.pi / 4, 0, 0), lerp)
	char.LeftHand.CFrame	= char.LeftHand.CFrame:Lerp(bike.Handlebars.CFrame * CFrame.new(0, 0.5, 0) * CFrame.Angles(math.pi / 4, 0, 0), math.min(lerp * 4, 1))
	
	char.RightFoot.CFrame	= char.RightFoot.CFrame:Lerp(bike.Frame.CFrame * CFrame.new(1, 2, 8) * CFrame.Angles(-math.pi / 1.5, -math.pi / 5, 0), math.min(lerp * 0.8, 1))
	char.LeftFoot.CFrame	= char.LeftFoot.CFrame:Lerp(bike.Frame.CFrame * CFrame.new(-1, 2.5, 8.5) * CFrame.Angles(-math.pi / 1.5, 0, 0), lerp)
	
	local offset	= char.Hips.CFrame:toObjectSpace(char.Torso.CFrame)
	local offset2	= char.Torso.CFrame:toObjectSpace(char.Head.CFrame)
	
	char.Hips.CFrame		= char.Hips.CFrame:Lerp(bike.Frame.CFrame * CFrame.new(0, 3, 4) * CFrame.Angles(-math.pi / 3, -math.pi / 4, 0), lerp)
	char.Torso.CFrame		= char.Hips.CFrame * offset
	char.Head.CFrame		= char.Torso.CFrame * offset2
end

return trick

end

return TRICK

Superman:
local TRICK = {}

function TRICK.Create(self, character, char, bike)
local trick = {
Start = tick();
Length = 1;
}

function trick.UpdateBike(self)
	
end

function trick.UpdateChar(self)
	local alpha	= math.clamp((tick() - self.Start) / self.Length, 0, 1)
	local lerp	= -math.abs(2*alpha - 1)^2 + 1
	
	char.RightHand.CFrame	= char.RightHand.CFrame:Lerp(bike.Handlebars.CFrame * CFrame.new(1, 0.5, 0) * CFrame.Angles(-math.pi / 4, 0, 0), lerp)
	char.LeftHand.CFrame	= char.LeftHand.CFrame:Lerp(bike.Handlebars.CFrame * CFrame.new(-1, 0.5, 0) * CFrame.Angles(math.pi / 4, 0, 0), math.min(lerp * 4, 1))
	
	char.RightFoot.CFrame	= char.RightFoot.CFrame:Lerp(bike.Frame.CFrame * CFrame.new(1, 2, 8) * CFrame.Angles(-math.pi / 1.5, -math.pi / 5, 0), math.min(lerp * 0.8, 1))
	char.LeftFoot.CFrame	= char.LeftFoot.CFrame:Lerp(bike.Frame.CFrame * CFrame.new(-1, 2.5, 8.5) * CFrame.Angles(-math.pi / 1.5, 0, 0), lerp)
	
	local offset	= char.Hips.CFrame:toObjectSpace(char.Torso.CFrame)
	local offset2	= char.Torso.CFrame:toObjectSpace(char.Head.CFrame)
	
	char.Hips.CFrame		= char.Hips.CFrame:Lerp(bike.Frame.CFrame * CFrame.new(0, 3, 4) * CFrame.Angles(-math.pi / 3, -math.pi / 4, 0), lerp)
	char.Torso.CFrame		= char.Hips.CFrame * offset
	char.Head.CFrame		= char.Torso.CFrame * offset2
end

return trick

end

return TRICK

2 Likes

“how to REMOVE the limit on how far you can go before getting teleported back to the spawn”

You Mastermind. I will definitely do this :+1:

Don’t know, but I feel like putting “REMOVE” in all caps sounds rude

i was just pointing out that he said REMOVE the limit.
not what the limit is.

How can I use normal R15 Roblox characters instead of the custom one? I want this to be a bike in a game you can get onto and off whenever you want. disabling the character script throws errors and I can’t find any other way in any of the scripts to do this

5 Likes

Sorry to join along on this after a while, But is it possible to make the tricks server sided so other plays can see your tricks etc?

how to remove the character and put the character of the player?

4 Likes

How do i make mobile support for this system?

1 Like

I’m having issues converting the bike system to R15 (the players character) :frowning: if anyone knows a way let me know!!1

1 Like

is there a way to ditch the custom character and move back to Roblox character?

3 Likes

Wild ): obby but your on a bike and bike of hell used this and make hundreds of millions.

More tricks:

360:
local TRICK = {}

function TRICK.Create(self, character, char, bike)
local trick = {
Start = tick();
Length = 0.7;
}

function trick.UpdateBike(self)
	local alpha	= math.clamp((tick() - self.Start) / self.Length, 0, 2)
	local lerp	= -math.abs(2*alpha - 1)^4 + 1

	local offset	= bike.Frame.CFrame:toObjectSpace(bike.Forks.CFrame)

	bike.Frame.CFrame	= bike.Frame.CFrame:Lerp(bike.Frame.CFrame * CFrame.Angles(0, -alpha * math.pi * -2, 0), lerp)
	bike.Forks.CFrame	= bike.Frame.CFrame * offset
	
	bike.Frame.CFrame	= bike.Frame.CFrame:Lerp(bike.Frame.CFrame * CFrame.new(0, 0.4, 0) * CFrame.Angles(math.pi / 15, 0, 0), lerp)
	bike.Forks.CFrame	= bike.Frame.CFrame * offset
end

function trick.UpdateChar(self)

end

return trick

end

return TRICK

Tbog:

local TRICK = {}

function TRICK.Create(self, character, char, bike)
local trick = {
Start = tick();
Length = 0.8;
}

function trick.UpdateBike(self)
	local alpha	= math.clamp((tick() - self.Start) / self.Length, 0, 1)
	local lerp	= -math.abs(2*alpha - 1)^2 + 1

	local offset	= bike.Frame.CFrame:toObjectSpace(bike.Forks.CFrame)

	bike.Forks.CFrame	= bike.Forks.CFrame:Lerp(bike.Forks.CFrame * CFrame.Angles(0, -alpha * math.pi * 1, 0), lerp)
	
	local alpha	= math.clamp((tick() - self.Start) / self.Length, 0, 2)
	local lerp	= -math.abs(2*alpha - 1)^4 + 1

	local offset	= bike.Frame.CFrame:toObjectSpace(bike.Forks.CFrame)

	bike.Frame.CFrame	= bike.Frame.CFrame:Lerp(bike.Frame.CFrame * CFrame.new(0, 0.3, -1.5) * CFrame.Angles(math.pi / -10, 0, 0), lerp)
	bike.Forks.CFrame	= bike.Frame.CFrame * offset
end

function trick.UpdateChar(self)
	local alpha	= math.clamp((tick() - self.Start) / self.Length, 0, 1)
	local lerp	= -math.abs(2*alpha - 1)^2 + 1

	char.RightHand.CFrame	= char.RightHand.CFrame:Lerp(bike.Frame.CFrame * CFrame.new(2 - lerp, 2, -2 + lerp * 2) * CFrame.Angles(math.pi / 4, 0, 0), lerp)
	char.LeftHand.CFrame	= char.LeftHand.CFrame:Lerp(bike.Seat.CFrame * CFrame.new(-0.6 + lerp, 0, 0.7 - lerp) * CFrame.Angles(math.pi / 4, 0, 0), lerp)
end

return trick

end

return TRICK

truck driver with opposite bar:
local TRICK = {}

function TRICK.Create(self, character, char, bike)
local trick = {
Start = tick();
Length = 0.7;
}

function trick.UpdateBike(self)
	local alpha	= math.clamp((tick() - self.Start) / self.Length, 0, 2)
	local lerp	= -math.abs(2*alpha - 1)^4 + 1

	local offset	= bike.Frame.CFrame:toObjectSpace(bike.Forks.CFrame)

	bike.Frame.CFrame	= bike.Frame.CFrame:Lerp(bike.Frame.CFrame * CFrame.Angles(0, -alpha * math.pi * -2, 0), lerp)
	bike.Forks.CFrame	= bike.Frame.CFrame * offset
	
	local offset	= bike.Frame.CFrame:toObjectSpace(bike.Forks.CFrame)

	bike.Forks.CFrame	= bike.Forks.CFrame:Lerp(bike.Forks.CFrame * CFrame.Angles(0, -alpha * math.pi * -2, 0), lerp)
	
end

function trick.UpdateChar(self)
	local alpha	= math.clamp((tick() - self.Start) / self.Length, 0, 1)
	local lerp	= -math.abs(2*alpha - 1)^2 + 1

	char.RightHand.CFrame	= char.RightHand.CFrame:Lerp(bike.Frame.CFrame * CFrame.new(2 - lerp, 2, -2 + lerp * 2) * CFrame.Angles(math.pi / 4, 0, 0), lerp)
	char.LeftHand.CFrame	= char.LeftHand.CFrame:Lerp(bike.Frame.CFrame * CFrame.new(-2 + lerp, 2, -2 - lerp) * CFrame.Angles(math.pi / 4, 0, 0), lerp)
end

return trick

end

return TRICK

1 Like