• Bodygroup spawn doesn't work?
    7 replies, posted
Hi, tried to change bodygroup on spawn, though there's no effect at all? Am I doing something wrong?     PlayerSpawn = function(ply)         ply:SetSkin(0)         ply:SetBodygroup(2, 1)         ply:SetBodygroup(3, 6)         ply:SetBodygroup(4, 1)         ply:SetHealth(100)         ply:SetMaxHealth(100)     end
Where did you place PlayerSpawn function?
They are probably being overridden by the default player class if you are using Sandbox.
TEAM_STPVT = DarkRP.createJob("Stormtrooper Private", {     color = Color(255, 255, 255, 255),     model = {"models/nate159/swbf2015/playermodels/stormtrooper.mdl"},     description = [[You are stormtroopers. You are the keenest weapon in the Emperor's arsenal.]],     weapons = {"weapon_etc"},     command = "STPVT",     max = 0,     salary = 100,     vote = false,     hasLicense = true,     candemote = false,     admin = 0,     sortOrder = 1;     category = "Stormtroopers",     PlayerSpawn = function(ply)         ply:SetSkin(0)         ply:SetBodygroup(2, 1)         ply:SetBodygroup(3, 6)         ply:SetBodygroup(4, 1)         ply:SetHealth(100)         ply:SetMaxHealth(100)     end
Change SetHealth & SetMaxHealth to something over 100 and see if the health changes. If it does, then maybe the model doesn't have any bodygroups? Also replace the semicolon with a comma at the end of sortOrder = 1;
Make shure what u don't use addons with bodygroups modify. For example enhanced playermodel selector
SetHealth & SetMaxHealth works. The model got bodygroups, can use "Easy Bodygroup Tool" and change it, though that wouldn't have anything with it not working?
After trying back and forward a bit, I figured out that the space between the numbers messed up... Thanks guys.
Sorry, you need to Log In to post a reply to this thread.