im trying to save a player’s equipped tool but i can’t even detect if a player has an equipped tool when they leave in the first place
code:
Players.PlayerRemoving:Connect(function(Player)
local Tool = Player.Character:FindFirstChildOfClass("Tool")
if Tool then
print("Tool found inside character.")
end
end)
it doesnt print anything, but it does error “attempt to index nil with ‘FindFirstChildOfClass’”
When the player equips the tool, store it in a table on the server and save that when the player leaves. The tool gets deleted with the player before you can save it.