Hello, as an example if a player touches on brick, he'd just continuously start going forward until another brick is touched to return to default?
✓ ANSWER ACCEPTED
How to force player movement forward when a brick is touched?
1 answer
✓ Accepted answer
I made a Local Script that forces forward movement for the Local Player but still allowing the Local Player to turn. Hopefully you can apply this in the way that you desire. Here's the code:
local function Forward()
local plr = game.Players.LocalPlayer
local char = plr.Character
local hpart = char.HumanoidRootPart
local hum = char.Humanoid
hum.TargetPoint = hpart.Position + hpart.CFrame.lookVector * 5
hum:MoveTo(hum.TargetPoint)
end
game:GetService("RunService").Heartbeat:Connect(Forward)
This discussion is preserved as it was. New answers, comments, and votes are closed.
