Checked the output nothing happens I believe it says "Disconnected event because of exception" I don't necessarily know what that means. So I will give this to you, so you can understand what the problem is, and maybe help me fix it.

*Put it in a local script, Still won't work *Tried to make it's parent Starterpack, Startergui, Workspace, Still didn't work *Animations won't play, nor will it change the body velocity from a far distance...

  wait(5)







local User = game.Players.LocalPlayer



local mouse = User:GetMouse()



Animation = Instance.new("Animation")



Animation.AnimationId = "http://www.roblox.com/Asset?ID=166143393"



Animation.Name = "Force push."



local animTrack = User.Character.Humanoid:LoadAnimation(Animation)



forceValue = 200 -- The ammount of force to use, for easy changeing







function ForcePush(key)  Keyboard

    if key == "f" then -- Checks if the button is F

        if mouse.Target ~= nil and mouse.Target:IsA("BasePart") then 

            if mouse.Target.Parent:IsA("Hat") then -- If its over a hat

                animTrack:Play() --Plays Anim

                mouse.Target.Parent.Parent.Torso.Velocity = (workspace.CurrentCamera.CoordinateFrame.lookVector*forceValue) + Vector3.new(0,70,0)

            elseif mouse.Target.Parent:FindFirstChild("Humanoid") then -- If its over a body part

                animTrack:Play() --Plays Anim

                mouse.Target.Parent.Torso.Velocity = (workspace.CurrentCamera.CoordinateFrame.lookVector*forceValue) + Vector3.new(0,70,0) 

            end

        end

    end

end





mouse.KeyDown:connect(ForcePush)


2 comments

1

Whats with all the empty space?

0

Does it matter?