How to create a super jump pad in roblox studio

3 months ago
9

Super jump pad, #roblox #jumppad #scripting #robloxstudio

Try my first game:https://www.roblox.com/games/14828063...

_____________Jump Pad Script_______________

local pad = script.Parent -- Assuming the script is placed inside the pad part

local direction = Vector3.new(1, 0, 0) -- Adjust the horizontal direction vector here
local verticalDirection = Vector3.new(0, 1, 0) -- Adjust the vertical direction vector here

local function onTouched(hit)
local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")

if humanoid then
local bodyVelocity = Instance.new("BodyVelocity")
local speed = 100 -- Adjust the speed here
local verticalSpeed = 100 -- Adjust the vertical speed here

local velocity = (direction.Unit * speed) + (verticalDirection.Unit * verticalSpeed)

bodyVelocity.Velocity = velocity
bodyVelocity.P = math.huge
bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bodyVelocity.Parent = humanoid.RootPart

-- Remove BodyVelocity after a certain duration (e.g., 2 seconds)
wait(2)
bodyVelocity:Destroy()
end
end

pad.Touched:Connect(onTouched)

________Jump Pad Sound Script_____________

local part = script.Parent

part.Touched:Connect(function(Hit)
if Hit.Parent:FindFirstChild("Humanoid") ~= nil then
local sound = script.Parent["sound"]

if not sound.IsPlaying then
sound:Play()
end
end
end)

#roblox #robloxstudio #robloxgames #jumppad #superjumppad #gamedevelopment #scripting
#robloxtutorials #robloxutorial

Loading comments...