So, I made a tool giving gui, it's activated by clicking a part, which then brings up the gui. It appeared to be working at first, but when I tested it with my friends, we noticed that only we could see our own weapons on our screens, and we couldn't see eachothers, also, the scripts within the tools are meant to sit down any character it hits, this script didn't work when the tool was given through the gui.
This is the localscript under the textbutton, which gives the tool BaseballBat is the tool
local p = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect (function()
local tool = script.Parent.BaseballBat:clone()
tool.Parent = p.Backpack
end)

4 comments
:connect() is deprecated use :Connect(). :clone() is deprecated use :Clone()
Thanks I wasn't aware, but it didn't fix it
Try using script.Parent.MouseButton1Click:Connect(function(plr), Make sure to not use a space between the function part and the Connect part. Instead of using local p use a player thing.
Also I don't think that you using the right syntax.You'd need to use a local BaseballBat = Xplace.BaseballBat, You'd most likely also need to use something like a GUI or something.