1- Is it possible to use “player:LoadCharacter()” when unequip a tool?
I will add accessories and clothes in the player when equipping a tool and when to unequip, I want to reset the character.
Can anyone tell me if it’s possible and any idea how to do it?
(It is a SERVER script, btw)
local Players = game:GetService("Players")
local Tool = script.Parent
local Character = nil
local ToolEquipped = false
Tool.Equipped:Connect(function()
if ToolEquipped then return end
ToolEquipped = true
Character = Tool.Parent
-- do stuff
end)
Tool.Unequipped:Connect(function()
Character = Tool.Parent
local Player = Players:GetPlayerFromCharacter(Character)
Player:LoadCharacter()
ToolEquipped = false
Character = nil
end)