I need help with a jump rope

Hello developers! I need help with a script inside of a jump rope part.
So I wanna make a jump rope that is going faster every minute.

Please someone help me.

Thank you.

2 Likes

PS: I have no idea how to make it

1 Like

Server script inside the jump rope model:

local model = script.Parent-- assuming the script is inside the model
local jumpropepart = script.Parent.Rope --Change this to the part of the model that will hit the player
local rotaxis = "X" -- Change this until the rope model rotates correctly
local basespeed = 1 -- You SHOULD change this, controls the starting speed
local speedmultiplier = 1.2 --The increase in speed every minute
local ropeactive = true

local x = 0 --Do not change these unless you want rotate offset
local y = 0
local z = 0
local currentspeed = 0 --Do not change this unless you know what you are doing
if rotaxis == "X" then
x = basespeed
end
if rotaxis == "Y" then
y = basespeed
end
if rotaxis == "Z" then
z = basespeed
end

local function rotate()
game:GetService("RunService").Stepped:Connect(function()
if ropeactive then
local rotation = CFrame.Angles(x * speedmultiplier,y * speedmultiplier,z * speedmultiplier)
modelCFrame = model:GetPivot()
model:PivotTo(modelCFrame * rotation)
end
end)
end

coroutine.wrap(rotate)()

while true do
task.wait(60)
currentspeed += 1
speedmultiplier = speedmultiplier * currentspeed

Local script in starterplayerscripts:

local damage = 50 --damage you take if you touch the rope

local db = false -- do not change

local model = workspace:WaitForChild("JumpRope")-- change to model location
local touchpart = model:WaitForChild("JumpRopePart") -- change name to the name of the part that touches the player

touchpart.Touched:Connect(function(hit)
if db then return end
db = true
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
game.Players.LocalPlayer.Character.Humanoid:TakeDamage(damage)
end
task.wait(0.5)
db = false
end)
1 Like

The modelCframe at line 26 says that modelcframe is only user for encloding function at line 13.

Can you fix it?

and also jump part is not rotating

The jump part is not rotating because there was an error in the script. Edit: I just realized what it said. Change modelCframe to a local variable by adding “local” in front of it.

Ok try this instead for the server script:

local model = script.Parent-- assuming the script is inside the model
local jumpropepart = script.Parent.Rope --Change this to the part of the model that will hit the player
local rotaxis = "X" -- Change this until the rope model rotates correctly
local basespeed = 1 -- You SHOULD change this, controls the starting speed
local speedmultiplier = 1.2 --The increase in speed every minute
local ropeactive = true

local x = 0 --Do not change these unless you want rotate offset
local y = 0
local z = 0
local currentspeed = 0 --Do not change this unless you know what you are doing
if rotaxis == string.upper("X") then
x = basespeed
end
if rotaxis == string.upper("Y") then
y = basespeed
end
if rotaxis == string.upper("Z") then
z = basespeed
end


game:GetService("RunService").Stepped:Connect(function()
if ropeactive then
local rotation = CFrame.Angles(x * speedmultiplier,y * speedmultiplier,z * speedmultiplier)
local modelCFrame = model:GetPivot()
model:PivotTo(modelCFrame * rotation)
end
end)

while true do
task.wait(60)
currentspeed += 1
speedmultiplier = speedmultiplier * currentspeed
end

Make sure that you change the rotaxis variable until the jump rope rotates the correct way.