Hello,
I've been struggling with this issue for a few days now... I made a tool, a potion that heals some of the player's damage when used. It works properly when placed in the starterpack, but errors (with the exact same script) when placed in the workspace (as I would like it to be a pickup tool and not a permanent item in the starterpack) But, the tool doesn't even show in the game and the script breaks on line3 (character = player.Character) saying "Character is not a valid member of DataModel. I've asked around but I can't seem to get a concrete answer. What am I missing/doing wrong?
local CanActivate = true local player = script.Parent.Parent.Parent or game.Players:GetPlayerFromCharacter(script.Parent.Parent) local character = player.Character
script.Parent.Activated:Connect(function() if CanActivate == true then CanActivate = false local animation = character.Humanoid:LoadAnimation(script.Parent.Animation) animation:Play() character.Humanoid.Health = character.Humanoid.Health + 25 print ("Health was restored by 25") wait(3) CanActivate = true script.Parent:Destroy() end end)

5 comments
Are any children of the tool non-archive-able or being destroyed?
i'm destroying the script at the end yes, but for the non-archive-able i will quickly check
all parts are checked 'archivable'
Ok I answered it.
thanks, that did solve the not valid member part, however the tool itself is still not being loaded in the game?