You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear! I want to only delete the tool from the players backpack so when i reclone the tool the tool is visible
-
What is the issue? Include screenshots / videos if possible! When i use :Destory the whole tool model gets deleted.
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I spent a couple hours editing my code and messing with it to no avil
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
-- getting Sound
local Sound = game.ServerStorage.HiddenTool.SledgeHammer.Sound
local Sound_Asset = "rbxassetid://321581454"
-- Getting Players
local Players = game:GetService("Players")
-- Getting the Tool
local Hidden_Tool = game.ServerStorage.HiddenTool.SledgeHammer
-- getting Player Character
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
-- Getting the Humanoid
local Humanoid = Character:WaitForChild("Humanoid")
-- Getting the Seat
local Seat = workspace.SeatModel.SeatPart.Seat
Humanoid.Seated:Connect(function(Seated)
if Seated then
print("Seated")
Hidden_Tool = Hidden_Tool:Clone()
Hidden_Tool.Parent = Player.Character
Sound:Play()
Sound.Looped = true
Sound.Playing = true
Sound.Volume = 5
else
--Hidden_Tool:Destroy() -- Deletes the entire model :/
Player.Character:FindFirstChildOfClass("Tool")
Player.Character:FindFirstChildOfClass("Tool"):Destroy()
end
end)
end)
end)
print("At The end")
So I’m trying to have a tool when a player sits on a seat and if the player leaves that seat, then the tool gets deleted from the players inventory is there any way i can delete a tool from the players backpack without deleting the entire model?