So I'm making a wardrobe script and my "Wardrobe" prop is spawning halfway in the ground (Picture below)
https://files.facepunch.com/forum/upload/112437/3b831326-f7c4-45c1-ae6c-ac1b7cd91b49/20180107171617_2.jpg
Here is the code: (the "init.lua" file)
function ENT:Initialize()
self:SetModel("models/props_c17/FurnitureDresser001a.mdl")
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
self:SetUseType(SIMPLE_USE)
local phys = self:GetPhysicsObject()
if phys:IsValid() then
phys:Wake()
end
end
Use ent:SetPos(ent:GetPos() + Vector(0,0,100)) for exemple
Works like a charm, thanks
Sorry, you need to Log In to post a reply to this thread.