Hello, I want to make a script, when player touch part then he can't stop. I mean he will still moving forward.
Here is my code, maybe will help something:
local m = game.Players:GetPlayerFromCharacter(script.Parent):GetMouse()
local p = 0
local r = false
function onTouch()
coroutine.resume(coroutine.create(function()
m.KeyDown:connect(function(key)
if key:lower() == "w" then p = p + 0
delay(0.5,function()
if p ~= 0 then p = 0 end
end)
if p == 0 then p = 0
r = true
m.KeyUp:connect(function(key)
if key:lower() == "w" then r = false end
end) end end end) end ))
end
script.Parent.Touched:connect(onTouch)
I'm beginner scripter, so i still don't understand a lot...

2 comments
May I suggest using BodyVelocity.
What you mean in using BodyVelocity? i think it works only on parts.