noblebrad121
-
Posts
7 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by noblebrad121
-
-
yeah ive dragged it from the scene tab and still nothing. ive tired a few object and its still the same result
-
well its not spawning objects and for some odd reason the script:UpdateWorld() is not blue like it should be.
but function is blue.
Script.spawnObject = "" --entity "spawn object"
Script.spawnTime= 1.0 --float "Spawn time"
Script.timer = 0
function Script:UpdateWorld()
self.timer = self.timer + (Time:GetSpeed()/100)
if(self.timer > self.spawnTime) then
local newObject = self.spawnObject:Instance()
newObject:SetPosition(self.entity:GetPosition ())
self.timer = 0
end
end
thank you for mentioning that its good to know.
-
I figured it out forgot to put cap S instead of s
-
well that fixed the line 9 but now the line 3 error came up it says
script error attempt to index global 'script' (a nil value)
line 3
i changed the script to this
Script.spawnObject = "" --entity "spawn object"
Script.spawnTime= 1.0 --float "Spawn time"
script.timer = nil
function Script:UpdateWorld()
self.timer = self.timer + (Time:GetSpeed()/100)
if(self.timer > self.spawnTime) then
local newObject = self.spawnObject:Instance()
newObject:SetPosition(self.entity:GetPosition ())
script.timer = 0
end
end
and it still did it after i changed the script.
btw i am really new to programming and stuff i dont really have any experience
-
thank you
-
Hello i am trying to create a spawner just a simple one and it seems to have a small error i dont understand. Any help would be greatly appreciated.
here is my code
Script.spawnObject = "" --entity "spawn object"
Script.spawnTime= 1.0 --float "Spawn time"
self.timer = 0
function Script:UpdateWorld()
self.timer = self.timer + (Time:GetSpeed()/100)
if(self.timer > self.spawnTime) then
local newObject = self.spawnObject:Instance()
newObject:SetPosition(self.entity:GetPosition {)}
self.timer = 0
end
end
and the error i get says
script error
unexpected symbol near ')'
line 9
that is the only error that it has came up with.
thank you for any help
Having a small issue with a spawner
in Programming
Posted
now its working im not sure i changed the mat on the object and now it works
thank you so much