-
What do you want to achieve?
The cloned horse jumps only once and no longer jumps. -
What is the issue?
-
What solutions have you tried so far?
I couldn’t do anything because there is no error on the output :<
I found a good horse kit and applied it to the car spawn system I made earlier, and found a bug where the cloned horse only jumps once and doesn’t jump anymore. At first I thought it was a problem with the horse kit and tried to fix it, but unfortunately I couldn’t find a problem with the horse kit. (Maybe not)
The cause of the bug that I determined is that this bug occurs when a horse is duplicated. I think I found the cause, but I don’t know a solution.
In case it may be a problem with the horse kit, I also uploaded the horse kit script.
Only animation runs, no jump
This is a clone script
local d = false
local plr = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Click:Connect(function()
local car = script.Parent.Parent.Car.Value:Clone()
local name = plr.Name
if d == false then
if plr.NCZone.Value == false then
if plr.Car2.Value == true then
if plr.Spawned.Value == false then
plr.Spawned.Value = true
car.PrimaryPart = car.Seat
car:SetPrimaryPartCFrame(plr.Character.HumanoidRootPart.CFrame * CFrame.new(0,10,15))
car.Parent = game.Workspace.Cars[name]
plr.Character.Team:Clone().Parent = car
else
d = true
script.Parent.Text = "Already spawned"
script.Parent.BackgroundColor3 = Color3.fromRGB(255, 11, 11)
wait(1)
script.Parent.Text = "Spawn"
script.Parent.BackgroundColor3 = Color3.fromRGB(0, 255, 29)
d = false
end
else
d = true
script.Parent.Text = "Hacker"
script.Parent.BackgroundColor3 = Color3.fromRGB(255, 11, 11)
wait(1)
script.Parent.Text = "Spawn"
script.Parent.BackgroundColor3 = Color3.fromRGB(0, 255, 29)
d = false
end
else
d = true
print("No")
script.Parent.Text = "Areas that cannot be spawned"
script.Parent.BackgroundColor3 = Color3.fromRGB(255, 11, 11)
wait(1)
script.Parent.Text = "Spawn"
script.Parent.BackgroundColor3 = Color3.fromRGB(0, 255, 29)
d = false
end
end
end)
plr.Car2.Changed:Connect(function(new)
if new == false then
script.Parent.Parent:Destroy()
end
end)
Horse jumping function
function OnServerInvoke(player, Mode, Value)
if player ~= Rider or not Mode then
return
end
if Mode == "Jump" then
local Now = tick()
if (Now - LastJump) >= 1 then
LastJump = Now
Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
local Animation = Animations.Jump
JumpTrack:Play(Animation.FadeTime, Animation.Weight, Animation.Speed)
end
elseif Mode == "Dismount" then
Dismount()
end
end