Hi,
This is a ball as StarterCharacter.
I fixed a few problems in my old project. This time the character works really stable.
Old Project: Orb Character (Outdated)
New features:
-Better jump velocity
-Fixed high frame-rate issues (Thanks to Agent_Invalid)
Game Link: Orb Version 2 [Open Source] - Roblox
Example Video: (Outdated use game link instead)
Source Code:
local human = script.Parent.Humanoid
local ball = script.Parent.Ball
local debounce = true
local uis = game:GetService("UserInputService")
local jumppower = "60"
function move(dt)
if human.FloorMaterial ~= Enum.Material.Air then
ball.Velocity = ball.Velocity + (human.MoveDirection * human.WalkSpeed) * dt
end
if human.FloorMaterial == Enum.Material.Air then
ball.Velocity = ball.Velocity + (human.MoveDirection * human.WalkSpeed) * dt
end
end
uis.InputBegan:Connect(function(i)
if i.KeyCode == Enum.KeyCode.Space and debounce == true then
debounce = false
ball.Velocity = ball.Velocity + Vector3.new(0,jumppower,0)
wait(0.6)
--Vector3.new(0,jumppower,0)
debounce = true
end
end)
game:GetService("RunService").RenderStepped:Connect(move)
--[[You can credit me if you want.
-- renderlander]]