So this script is supposed to move a part forward but an error message pops up that says this:
bad argument #1 to '?' (Vector3 expected, got userdata)
and I don't know what that means, here is the localscript:
plr = game.Players.LocalPlayer mouse = plr:GetMouse() function w(key) if key:lower() == "w" then script.Disabled = true workspace.Char.Position = workspace.Char - Vector3.new(0,0,1) script.Disabled = false end end mouse.KeyDown:connect(w)
You tried to set workspace.Char's Position to a UserData.. an instance. Position only takes the Vector3 Scale as an argument, or anything that returns a Vector3.
Also I don't have any idea why you're disabling the script. By disabling the script you're discontinuing any code after the disabling action.
Try dis;
local plr = game.Players.LocalPlayer local mouse = plr:GetMouse() mouse.KeyDown:connect(function(key) if key:lower() == "w" then workspace.Char.Position = workspace.Char.Position - Vector3.new(0,0,1) end end)
Also, make sure workspace.Char isn't nil.