Jump to content

Recommended Posts

function SpawnItem(player)

 

--Spawn the item at the world origin.

local item = GLOBAL.SpawnPrefab("Your Prefab")

 

--Move the item to the player's position.

item.Transform:SetPosition(player.Transform:GetWorldPosition())

 

end

 

AddSimPostInit(SpawnItem)

 

This will spawn it everytime you enter the game though so I need to find a way to only spawn it once.

 

I did look in the eye bone.

It use the GetSpawnPoint function which need what Vector3 function return though I don't know what it return , I don't know where the definition is. In the eye bone file, it use inst.Transform:GetWorldPosition() but when I replace it with player.Transform:GetWorldPosition() I get "attempt to call 'Vector3' (a nil value)"

Edited by Gekido2802

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