ContextActionService not working with the remote events

I was trying to make a function for movement, that would teleport player by 8 studs in a specific direction depending on input. Inside function, I use remote events to fire server scripts. For some reason it does not work properly. While my character can’t move, like it is intended, the remote events don’t seem to fire.


Here is a local script inside the starter player scripts.

And this is a server script. Other server scripts are similar to that one.

Why use context action service and not user input service?
Also, why not move the player on the client rather than sending a remote event for each?
Also, you shouldn’t send the player from the client to the server, it does that by itself

1 Like

I am just really bad at scripting. As far as I understood, I should use user input service instead?

Unless you have a really good reason to use context action service (you probably dont) then yeah

1 Like

Well, I will try that, and tell if it will work

image
Does not really work. Am I doing something wrong?

if input.KeyCode == Enum.KeyCode.W then

1 Like

Oh my! This indeed worked! I have only one issue left. Do you know by any chance how would I disable player’s regular movement? So that the character won’t actually walk or jump?

local Controls = require(Player.PlayerScripts:WaitForChild("PlayerModule")):GetControls()

	Controls:Disable() -- Disables

	Controls:Enable() -- Enables
1 Like

Awesome. Thank you a lot for help!

Also, you don’t need to pass in the player argument when using :FireServer(), the first parameter will always be the player in the server script