You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
i currently want to push the player forward automatically without the character being able to move, simple enough
What is the issue? Include screenshots / videos if possible!
i tried using context action service, but if you’re holding a control key while the controls get re-enabled then it doesn’t move the player
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i’ve tried looking for solutions on the devhub, but nothing has worked
Then simply wait until the player is on the ground. Example:
function freezePlayer(plr)
if plr.Character then
local char = plr.Character
local hum = char.Humanoid
if hum:GetState() == Enum.HumanoidStateType.FreeFall then
repeat
local old,new = hum.StateChanged:Wait()
until new == Enum.HumanoidStateType.Landed
end
char.HumanoidRootPart.Anchored = true
end
end
You could try to get the player humanoid to then use plrHumanoidHere:MoveTo(obj.Position) https://developer.roblox.com/en-us/api-reference/function/Humanoid/MoveTo
To prevent the player from moving, you can try disabling the player’s keybind. I created a script that did this some time ago, unfortunately I couldn’t find it so I’ll link to a forum post that looks like what I did at the time.
like i said in the post, i’ve tried using contextactionservice but if im holding the W key before i regain control of the player, then when i DO gain back control he still won’t move till i let go of the key then hold it down again if that makes any sense
Then the problem may be in this script, if the script handle or have any effect with the way the player move or how the inputs are used it may be the source of your problem