but it says i need permission 5 which is only for plugins
is there another way to disable the movement input without anchoring the player or setting the walkspeed to 0?
You can use UserInputService to detect when the “F” key is pressed and then disable the default keyboard input for movement while your script is executing. Here’s an example code, that should do what you want:
local UserInputService = game:GetService(“UserInputService”)
local humanoid = game.Players.LocalPlayer.Character.Humanoid
local function moveToPart(part)
local success, message = pcall(function()
humanoid:MoveTo(part.Position)
end)
if not success then
warn("Failed to move to part:", message)
end
end
local function onKeyPressed(input, gameProcessedEvent)
if input.KeyCode == Enum.KeyCode.F and not gameProcessedEvent then
UserInputService.OverrideMouseIconBehavior = Enum.OverrideMouseIconBehavior.ForceHide
UserInputService.OverrideMouseIconEnabled = true
UserInputService.ModalEnabled = true
UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
UserInputService.MouseIconEnabled = false
UserInputService.KeyboardEnabled = false
moveToPart(workspace.PartToMoveTo)
UserInputService.OverrideMouseIconEnabled = false
UserInputService.ModalEnabled = false
UserInputService.MouseBehavior = Enum.MouseBehavior.Default
UserInputService.KeyboardEnabled = true
end
end
than this should be your solution i think it disables the player module so you should keep the humroot aunanchored and u can still have the humwalkspeed on whatever Roblox - How to Stop/Disable Player Movement - YouTube