I’m trying to make a system where you press F you slowly move forward like a dash but I can’t use adjust the player’s HRP to move. I’ve tried looking up solutions and I learned what ToObjectSpace and what ToWorldSpace was doing it but I still don’t understand how to fix this issue.
Server script:
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(plr)
print(plr)
local HRP = plr.Character.HumanoidRootPart
HRP.AssemblyLinearVelocity = Vector3.new(0,50000,0)
print("Success")
end)
Local script in startgui:
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.F then
game.ReplicatedStorage.RemoteEvent:FireServer()
end
end)
Success is printed but nothing happens to the player, if I were to adjust the HRP’s assembly linear velocity by myself it would move them.