Hero Complex Posted January 20, 2018 Share Posted January 20, 2018 (edited) This is the error I'm currently getting: [string "scripts/mainfunctions.lua"]:249: bad argument #1 to 'find' (string expected, got nil) So either saved isn't actually supposed to be the item name (i.e. lucy) and my (item) in SpawnSaveRecord is too much of a departure from the original (inst._spear), though (inst._item) didn't work as saved became nil, or SpawnPrefab is trying to work with the variable name, rather than it's value. This is what I have there: local item = prefab print("Weapon is", item) local throwable = GLOBAL.SpawnSaveRecord(item) --Saved is coming up as the item now, but now: [string "scripts/mainfunctions.lua"]:249: bad argument #1 to 'find' (string expected, got nil) print("Throwable is", throwable) --am I gonna have to edit the SpawnPrefab function so it stringifies what item is rather than literally using item? throwable.Transform:SetPosition(inst:GetPosition():Get()) --I would have to edit the SpawnSaveRecord one too, wouldn't I? Edited January 22, 2018 by Hero Complex Link to comment https://forums.kleientertainment.com/forums/topic/86640-throwable-weapons-spawnprefab-having-issues/ Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now