So im making something and the script says no errors but wont work is there something wrong with this script ?
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then local bodyForce = Instance.new("BodyForce", hit.Parent.Torso) bodyForce.force = Vector3.new(0,300,0) end
end)
So there wasn't a problem with the script, just raise the gravity. But you had an issue where it kept cloning it in the player. So here it is.
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirtChild("Humanoid") then if hit.Parent.Torso:FindFirstChild("BodyForce") then--If already one in torso --Nothing else local bodyForce = Instance.new("BodyForce", hit.Parent.Torso) bodyForce.force = Vector3.new(0,300,0) end end end)