Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is wrong with my swimscript?

Asked by 8 years ago
local BP = Instance.new("BodyPosition")
Char = script.Parent.Parent.Character
function FloatEnable(obj)
    BP.Parent = obj:WaitForChild("Torso")
    BP.Position = Vector3.new(0,11.36,0)
    BP.MaxForce = Vector3.new(0,11000,0)
end

workspace.PART.Touched:connect(function(obj_hit)
    if obj_hit.Parent:WaitForChild("Head") then
        FloatEnable(obj_hit.Parent)
    else
        print("Not Humanoid")
    end
end)

workspace.PART.TouchEnded:connect(function()

BP:Remove()
end)

--It works fine but when I jump while I'm touching  workspace.PART I freeze in the air. If you test this you'd see what I mean.Help?

0
Why don't you disable jumping? rexbit 707 — 8y

Answer this question