Hey. I am currently trying to create a function that disables Movement Input. But when I try that, the error "W006: Statement spans multiple lines" comes up. That is my code:
Edit: Did not post the whole code, I am stupid ik.
local ContextActionService = game:GetService("ContextActionService") local FREEZE_ACTION = "freezeMovement" function Freeze() ContextActionService:BindAction( FREEZE_ACTION, --This is where the error comes up. function() return Enum.ContextActionResult.Sink end, false, unpack(Enum.PlayerActions:GetEnumItems()) ) end function UnFreeze() ContextActionService:UnbindAction(FREEZE_ACTION) end
The message 'spans across multiple lines' is not an error. It's just informing you that the statement "spans across multiple lines". Running this code would differ no differently when its all in one line. Should you want to remove the 'warning', this is how I'd do it.
ContextActionService:BindAction(FREEZE_ACTION, function() return Enum.ContextActionResult.Sink end, false, unpack(Enum.PlayerActions:GetEnumItems()))