phuochung14 Posted March 30, 2020 Share Posted March 30, 2020 i need give some item to a player by command i google and found command: UserToPlayer("player_name").components.inventory:GiveItem(GLOBAL.SpawnPrefab("name_of_item")) but GLOBAL not declare at console. i want a command can use at dedicated console,any solution? Link to comment Share on other sites More sharing options...
Daniel86268 Posted March 31, 2020 Share Posted March 31, 2020 I never tried it, but try doing it without the GLOBAL. part. So just UserToPlayer("player_name").components.inventory:GiveItem(SpawnPrefab("name_of_item")) Link to comment Share on other sites More sharing options...
phuochung14 Posted March 31, 2020 Author Share Posted March 31, 2020 1 hour ago, Daniel86268 said: I never tried it, but try doing it without the GLOBAL. part. So just UserToPlayer("player_name").components.inventory:GiveItem(SpawnPrefab("name_of_item")) It's work, thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.