Your issue is related to Filtering Enabled. Because you're adding the tool to the client's Backpack via a local script, the change will not be replicated to the server. To fix this, you simply need to utilize a Remote Event to tell the server to make the action once the MouseButton1Click event is fired.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Remote = Instance.new("RemoteEvent")
local Remote.Parent = ReplicatedStorage
Remote.OnServerEvent:Connect(function(player,tool)
local NewTool = tool:Clone()
NewTool.Parent = player.Backpack
end)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Remote = ReplicatedStorage:WaitForChild("RemoteEvent")
local button = script.Parent
local tool = ReplicatedStorage:WaitForChild("Room 101")
button.MouseButton1Click:Connect(function()
Remote:FireServer(tool)
end)
If you have any questions regarding this code, feel free to leave them in the comments. I'm happy to answer!
##Resources:
Remote Events
##Accept and upvote if this helps!
1 comment
Sorry it late but some reason its not working.