Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to get player character again in tool?

Asked by
TechModel 118
2 years ago

So this script is a server located in tool and I want to get the player to equip the accessories, and then unequip the tool to avoid breaking the animation and destroying it out of backpack. I forgot how to get the character of the player again through function? Thanks

script.Parent.Activated:Connect(function(plr)
    local x = game.ServerStorage.Helmet:Clone()
    x.Parent = plr.Character or plr.CharacterAdded:wait()
    plr:UnequipTools()
    script.Parent:Destroy()
end)

Answer this question