Core Posted January 18, 2018 Share Posted January 18, 2018 I have simple problem. I want to be able to remove cover/lid/door off some objects before I have access to them. Now I have it working with this simple script: Script.cover = nil function Script:Start() self.cover = self.entity:FindChild("DoorElectronics1_11_cover") self.cover:SetMass(0) end function Script:Use(player) self.cover:SetMass(1) end So when I "use" parent entity, it makes the cover (child) to fall off. This is ok, but I want to be able to pick it up or even pick it up from it's place without dropping it to the floor. I have an idea how I will store covers original position to be able to put it even back to it's original place, but I can't seem to figure out how I can make the object from static to act like normal simple pickupable object with physics. Like the basic one when you have no script, set it's collision type to prob and give it a mass. Here is video demonstration: Edit. Ah, ok. It does not work if object I'm trying to pick up is parented to a static object. So self.cover:SetParent(nil) did the trick. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.