Player:GetCurrentCommand called outside of command/prediction

I’m trying to kind of remake ghost entities because I didn’t like the built in stool ghost entity functions. Most of it is pretty easy until I try to rotate it; my makeshift UpdateGhostEntity function errors when I try Player:GetCurrentCommand with that error. I’m calling it clientside in a think hook, does anyone know how to fix it?

Must be used in a move hook. If you want the current command, just use CreateMove.

the weld tool uses think though

weld.lua - line 175

also I tried hooking it by doing this in my code:

[lua]local function SetupMove(ply, cmd)
if(TOOL:getStage() == 1) then
local deg = cmd:GetMouseX()*0.05
TOOL.Ghost:GetPhysicsObject():RotateAroundAxis(TOOL.Ghost:GetUp(), deg)

hook.Add(“SetupMove”, “askjdahsdasD”, SetupMove)[/lua]

nothing prints

Why aren’t you using CreateMove–also TOOL won’t work.

[editline]4th March 2013[/editline]

Its probably working on easyweld because its on server and it would be predicted

hooking to createmove worked, but how can I reference the tool in it? I really wish there was a better way to do this

Get the tool from the swep. You know you could just handle it serversided

I ended up just changing a non-local var in CreateMove, and I only use it when I need it, but it sucks. thanks though