The title should say it all.
Here's my code:
script.Parent.Equipped:connect(function()
character = script.Parent.Parent
if character:FindFirstChild('HumanoidRootPart') then
for i,v in pairs(character.HumanoidRootPart:GetChildren()) do
if v.Name == "JUMPHIGH" then
v:Remove()
end
end
local BodyForce = Instance.new("BodyForce", character.HumanoidRootPart)
BodyForce.Name = "JUMPHIGH"
BodyForce.force = Vector3.new(0,0,0)
for a, prt in pairs(character:children()) do
if prt:IsA("BasePart") then
BodyForce.force = BodyForce.force + Vector3.new(0,prt:GetMass()*90,0)
elseif prt:IsA("Accoutrement") then
BodyForce.force = BodyForce.force + Vector3.new(0,prt.Handle:GetMass()*90,0)
end
end
end
end)
script.Parent.Unequipped:connect(function()
if character:FindFirstChild('HumanoidRootPart') then
for i,v in pairs(character.HumanoidRootPart:GetChildren()) do
if v.Name == "JUMPHIGH" then
v:Remove()
end
end
end
end)
Does anyone have any idea what could be going wrong? In a few rare cases, I've seen players getting stuck in the ceiling because they're jumping infinitely high. Nobody is exploiting or anything, there's something going wrong with this script :).
I haven't identified what the players this affects have in common, but people have been reporting it (and I have seen it happen) in my game.
Thanks for any help :)
