Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to force player movement forward when a brick is touched?

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?

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.