So, I am trying to create a combat system, and I am currently experimenting with some things. I want to make a script that basically knocks up the nearest player (did not implement that yet, i am still experimenting) and i already ran into some issues.
local dummy = game.Workspace.Dummy
local dHum = dummy:FindFirstChild("Humanoid")
local dHRP = dummy:FindFirstChild("HumanoidRootPart")
local UIS = game:GetService("UserInputService")
local deb = false
UIS.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.KeyCode == Enum.KeyCode.Q and not deb then
deb = true
dHum.WalkSpeed = 0
dHum.JumpPower = 0
local v = Instance.new("LinearVelocity", dHRP)
v.MaxForce = 99999999
v.VectorVelocity = Vector3.new(0,10,0)
game.Debris:AddItem(v,0.3)
wait(5)
deb = false
end
end)
basically I add a linearvelocity to the dummy's HumanoidRootPart, and so i thought to myself "This should move the dummy upwards, right?"
Welp, i was not right, please help

6 comments
it still did not work for some reason
Wdym I even tested it in studio myself.
same bro, did not work. Where did you put the LocalScript?
I edited the answer. Just follow the instructions and it should work.
bro i am not even kidding you, it's still not working. I followed the instructions word to word and it'sstill not working. If you have discord i can show you there.
nevermind, it worked, for some reason i tested it twice, with the first time having no errors at all and it still did not work, but it worked now so thank you, i appreciate the help