#How do i snap the play to cardinal directions then they move

1 messages · Page 1 of 1 (latest)

simple sleet
#

im tryning to make a game simular to block tales and i want to replicate the movement snapping

lean jacinth
#

i remember reading something about this in the docs

#

there's another one for touch controls (phone etc)

#

i'm fairly sure these will disconnect the player's inputs from their character's humanoid

#

from there i was able to get some interesting results with this command to override the humanoid's MoveDirection since that property is read-only local chr=game.Players:GetPlayers()[1] local hum=chr.Humanoid local hrp=chr.HumanoidRootPart local cam=workspace.CurrentCamera for i=1,100,1 do task.wait() hum:MoveTo(hrp.Position+cam.CFrame.LookVector+cam.CFrame.RightVector) end

simple sleet
#

wait what

lean jacinth
#

then you just connect userinputservice/contextactionservice to that and there u go

simple sleet
#

sorry in new to studio

#

can you maybe simplify this?

lean jacinth
# simple sleet can you maybe simplify this?

no, you are overriding default roblox controls. this is already the simple way. the actual hard way is making your own humanoid controller using controllermanager, but that is not for beginners.

#

i dont expect a beginner to be able to achieve this on their own

simple sleet
#

i dont understand

lean jacinth
#

you can also use it to snap to a grid

#

or rather, the character will move like normal but you can make its movements always land on a grid tile

simple sleet
#

is there something im supposed to do?

lean jacinth
simple sleet
lean jacinth
simple sleet
#

played module?

lean jacinth
#

it's not very well documented (or rather, at all)

simple sleet
#

im so confused

#

so from what im getting

lean jacinth
#

you picked a thing that happens to be rather difficult to do

simple sleet
#

oh

lean jacinth
#

maybe go with +1jump/sec instead for a first project, that's much more beginner friendly 👍

simple sleet
#

i think thats a bit too simple for me

#

cant i do something like that with a script?

lean jacinth
lean jacinth
simple sleet
#

oh

#

welp ive hit a road block

lean jacinth
simple sleet
#

im sorry i just cant understand this

#

although i do know a little more about how roblox works

lean jacinth
#

ye u just need to snap the values of humanoid.movedirection

#

problem is, it is read-only.

#

so you have to do jank workaround to make it do what you want

simple sleet
#

do you know how to do it?

#

i can pay you in robux

vast plaza
simple sleet
#

yeah

vast plaza
#

dms

bright jewel
simple sleet
#

uhh yes i did fix it