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

Body Velocity won't make the object move. Why?

Asked by 5 years ago
game.StarterPack.RemoteEventG.OnServerEvent:Connect(function(plr, hit)
    plr.XP.Value = plr.XP.Value + 350
    wait(0.1)
    local x1 = game.ReplicatedStorage.G1:Clone()

    x1.Parent = workspace
    x1.Transparency = 0
    x1.CFrame = plr.Character.HumanoidRootPart.CFrame*CFrame.new(-4, 0.5, 2)
    local v = Instance.new("BodyVelocity")
    v.Parent = x1
    v.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
    v.Velocity = (x1.Position - hit.p).unit*-165
end)

Answer this question