Jump to content

Recommended Posts

8 hours ago, EscapeMan4 said:

Thank you, but now I'm encountering this problemimage.png.9c18dfcf3c396a1856bfcf47585768d2.png

I guess you copied "inst:WatchWorldState("isday", SpawnIceFunction)" without adding any code of your own?
Of course you have to define and write the SpawnIceFunction. The error message says, tha tis trying to call a function that is nil (not defined)

12 hours ago, Serpens said:

I guess you copied "inst:WatchWorldState("isday", SpawnIceFunction)" without adding any code of your own?
Of course you have to define and write the SpawnIceFunction. The error message says, tha tis trying to call a function that is nil (not defined)

No this is the code set for spawning ice

 

local icee = SpawnPrefab("ice").Transform:SetPosition(inst.Transform:GetWorldPosition())
	inst:WatchWorldState("isday", icee)

 

26 minutes ago, EscapeMan4 said:

No this is the code set for spawning ice

 

 

That's not a function, you need to do something like this
 

local function icee(inst)
		SpawnPrefab("ice").Transform:SetPosition(inst.Transform:GetWorldPosition())
 end

	inst:WatchWorldState("isday", icee)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...