I have a sword tool that is given to players globally when a remote event is activated. For some reason it is not able to activate once given to the players.
Here is the code:
local sword = game:GetService("ReplicatedStorage").Sword
local event = game:GetService("ReplicatedStorage"):WaitForChild("Winner")
local player = game:GetService("Players").LocalPlayer
event.OnClientEvent:Connect(function(s)
local clone = sword:Clone()
clone.Parent = player.Backpack
end)
That code is server code. You gave the tool on the client so the server doesn’t know about it. You need to give the tool on the server so that it will replicate to all players.