roysizon Posted February 26, 2016 Share Posted February 26, 2016 I made a pivot with a spawning object script, it works but I want the pivot to be a child to the player so that whenever the player moves the object spawns around him. I tried to do so but it didnt work. Here is the spawning script. It spawns only 3 object, each object every 15 second. Script.object = "" --Entity "Spawn Object" local lasttime = 0 local object1 = 3 function Script:UpdateWorld() if Time:GetCurrent()-15000>lasttime and object1 >0 then lasttime=Time:GetCurrent() local newobject = self.object:Instance() newobject:SetPosition(self.entity:GetPosition()) object1 = object1 -1 end Quote Link to comment Share on other sites More sharing options...
thehankinator Posted February 27, 2016 Share Posted February 27, 2016 I made a pivot with a spawning object script, it works but I want the pivot to be a child to the player so that whenever the player moves the object spawns around him. I tried to do so but it didnt work. Here is the spawning script. It spawns only 3 object, each object every 15 second. Script.object = "" --Entity "Spawn Object" local lasttime = 0 local object1 = 3 function Script:UpdateWorld() if Time:GetCurrent()-15000>lasttime and object1 >0 then lasttime=Time:GetCurrent() local newobject = self.object:Instance() newobject:SetPosition(self.entity:GetPosition()) object1 = object1 -1 end In what way did it not work? What happens when you change: newobject:SetPosition(self.entity:GetPosition()) to: newobject:SetPosition(self.entity:GetPosition(true), true) 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.