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

How come this velocity code does not make the part move foward?

Asked by
pevdn 32
2 years ago
local p = game.Players
local lp = p.LocalPlayer
local UIS = game:GetService("UserInputService")
local ws = game.Workspace

UIS.InputBegan:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.P then
        ws.Part.AssemblyLinearVelocity = Vector3.new(20,0,0)
    end
end)

That is my code, and it is a localscript parented to StarterCharacterScripts. Why does this code not make the part move? It does not give me any errors.

Thanks in advance.

Answer this question