Crossy road WASD movement?

Hi.

I was wondering how to go about making a crossy road movement system.
Specifically, I want to know how to:
When you press “W”, it jumps forwards. I want to know how to make that jump forward.

Sincerely,
-coolguyweir

3 Likes

Are you asking for a method or code? If it’s code, nobody will help you, and if it’s a method, then there’s multiple, but if you don’t know how to make this sort of system yet, it’s probably best to start smaller.

method.

I’m no beginner to rblx studio, btw.
I just have this one issue where the humanoidrootpart moves forward but the character stays behind.

local UIS = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoidrootpart = character:WaitForChild("HumanoidRootPart")
humanoidrootpart.Anchored = true

UIS.InputBegan:Connect(function(input, GPE)
	if input.KeyCode == Enum.KeyCode.W or input.KeyCode == Enum.KeyCode.Up then -- Making a if statement to ask if the players input is == to input
		local info = TweenInfo.new(0.5, Enum.EasingStyle.Circular, Enum.EasingDirection.In, 0, false, 0)
		local Animation = TweenService:Create(humanoidrootpart, info, {Position = (CFrame.new(humanoidrootpart.CFrame.Position)*CFrame.new(0,0,6)).Position})
		Animation:Play()
	end
end)

This is my local script. Placed in starterplayerscripts.
I just need to figure out why the darn character aint moving.

Edit: roblox inconvenience moment

1 Like

Yeah, there’s one weird thing with Roblox, and you have to use CFrame to make the HumanoidRootPart move with the character.

I want to tween the character
How do I incorporate frame into the tween?
Or would I separately to them?

Cuz I hope there’s a solution with tween service and nothing else O_o

Does this help at all?

1 Like

surprisingly, yes! All the other articles I read didn’t work O_o

thank you.

I see it was already solved, but you could use an animation as the jump, then when it ends, adjust their cframe.

1 Like

ya. I did something around that.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.