I’m trying to make players float just above a certain part whenever they touch it, but the bodyforce only starts working whenever the player jumps
robloxapp-20210604-1036075.wmv (1.7 MB)
I’m not sure if this is what’s supposed to be happening, if it is, are there any other ways to make this possible?
local Water = script.Parent.WaterLevel
Water.Touched:Connect(function(part)
local player = part.Parent:FindFirstChild("Humanoid")
if player and part.Name == "UpperTorso" then
if player.Parent.HumanoidRootPart:FindFirstChild("BodyForce") == nil then
local bforce = Instance.new("BodyForce")
local force = (workspace.Gravity*part:GetMass())*5
bforce.Force = Vector3.new(0,force,0)
bforce.Parent = player.Parent.HumanoidRootPart
end
end
end)