• Entity Bodygroups broken?
    4 replies, posted
Hello, I am having trouble with setting bodygroups both CLIENT/SERVER realms, hoping you guys can help! (is my game corrupted?) [CODE] local trace = Player:GetEyeTrace() local bg = {{7, 0}, {8, 0}, {9, 0}, {10, 0}, {11, 4}, {12, 0}, {13, 0}, {14, 0}, {15, 0}, {18, 0}} for _, d in pairs(bg) do print(d[1], "->", d[2]) end if IsValid(trace.Entity) and trace.Entity:IsVehicle() then for k,v in pairs(bg) do trace.Entity:SetBodyGroup(v[1], v[2]) end end [/CODE] [QUOTE][ERROR] lua/autorun/server/admin_functions.lua:48: attempt to call method 'SetBodyGroup' (a nil value) 1. unknown - lua/autorun/server/admin_functions.lua:48 2. unknown - lua/includes/modules/concommand.lua:54 [/QUOTE] [IMG]https://i.gyazo.com/64ed910ca01d770ab4cf1504efd21607.gif[/IMG]
Try moving that code to lua/autorun so it gets run for both client and server
[QUOTE=MPan1;52517825]Try moving that code to lua/autorun so it gets run for both client and server[/QUOTE] Still doesn't work after moving into shared realm. even just doing :SetBodyGroup(1, 1) errors out.
Oh, I'm stupid... I didn't notice the most obvious thing. The problem is this: SetBody[U][B]G[/B][/U]roup It should be lowercase. SetBody[U][B]g[/B][/U]roup
Thanks. Dunno why notepad++ recognizes it as a mutator.
Sorry, you need to Log In to post a reply to this thread.