Jump to content

roysizon

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by roysizon

  1. 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

  2. Ok I made the respawn pivot as a child to the player so that whenever the player is moving zombies spawn around him.

     

    Thats my spawining script:

     

     

    Script.spawncrawler = "" --Entity "Spawn Crawler"

     

    local lasttime = 0

    local crawler = 3

     

    function Script:UpdateWorld()

     

    if Time:GetCurrent()-15000>lasttime and crawler >0 then

    lasttime=Time:GetCurrent()

    local newcrawler = self.spawncrawler:Instance()

    newcrawler:SetPosition(self.entity:GetPosition())

    crawler = crawler -1

     

    end

×
×
  • Create New...