#Help me on my obey

1 messages · Page 1 of 1 (latest)

sinful narwhal
#

i want a script that makes me hover as soon as i go inside this part right here i made alot of scripts that dont work

sinful narwhal
#

bro

#

PLEASE

#

local hoverPart = script.Parent
local hoverHeight = 5 -- Height above the ground when hovering
local hoverForce = 2000 -- Adjust the strength of the hover effect
local hoveringPlayers = {}

-- Apply hover force
local function applyHoverForce(character)
local hrp = character:FindFirstChild("HumanoidRootPart")
if hrp and not hoveringPlayers[character] then
local attachment = Instance.new("Attachment")
attachment.Name = "HoverAttachment"
attachment.Parent = hrp

    local vf = Instance.new("VectorForce")
    vf.Name = "HoverForce"
    vf.Attachment0 = attachment
    vf.Force = Vector3.new(0, hoverForce, 0) -- Force going upwards
    vf.ApplyAtCenterOfMass = true
    vf.RelativeTo = Enum.ActuatorRelativeTo.World
    vf.Parent = hrp

    hoveringPlayers[character] = { attachment = attachment, force = vf }
end

end

-- Remove hover force
local function removeHoverForce(character)
local data = hoveringPlayers[character]
if data then
if data.attachment then data.attachment:Destroy() end
if data.force then data.force:Destroy() end
hoveringPlayers[character] = nil
end
end

-- Detect when a player enters the part
hoverPart.Touched:Connect(function(hit)
local character = hit:FindFirstAncestorWhichIsA("Model")
if character and character:FindFirstChildOfClass("Humanoid") then
applyHoverForce(character)
end
end)

-- Detect when a player leaves the part
hoverPart.TouchEnded:Connect(function(hit)
local character = hit:FindFirstAncestorWhichIsA("Model")
if character and character:FindFirstChildOfClass("Humanoid") then
removeHoverForce(character)
end
end)

#

THIS ISNT WORKING

#

WHY

sinful stream
#

your using ai code

#

thats why

#

dumba

sinful narwhal
#

i tried my own

#

also didnt wokr

#

work

sinful stream
#

check the output

sinful narwhal
#

can u help please

#

my script only worked when manully jumping

#

please bro

sinful stream
#

find any errors related to the code

sinful narwhal
#

no errors i just dont know how to make it automaticly hover me

#

no idea why its not working?

hollow locustBOT
#

studio** You are now Level 1! **studio

sinful stream
#

basically gravity change

#

and not hovering

hasty rover
sinful narwhal
sinful stream
#

no

#

actually