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)
If you doesn't see your friend tools it's because you have distributed them with the clients worlds. ROBLOX have inserted FilteringEnabled, the client can't send information to the server so you must use RemoteEvent.
What is RemoteEvent?
How to realise my script?
Put a RemoteEvent on ReplicatedStorage, name that "ToolGiverRequest". Put your tool on ReplicatgedStorage
Make a script (ServerScript) and put them on ServerScriptService, writte that on your ServerScript
local RStorageService = game:GetService('ReplicatedStorage') RStorageService.ToolGiverRequest.OnServerEvent:Connect(function(p) RStorageService.BaseballBat:Clone().Parent = p.Backpack end)
Your LocalScript (ClientScript) is now
local RStorageService = game:GetService('ReplicatedStorage') script.Parent.MouseButton1Click:Connect(function() RStorageService.ToolGiverRequest:FireServer() end)
Try that