local UnequipEvent = game.ReplicatedStorage.Folder.Unequipped local Tool = script.Parent.Parent local Players = game:GetService("Players") local player = game.Players.LocalPlayer Tool.Unequipped:Connect(function() UnequipEvent:FireClient(game.Players.LocalPlayer) print("yes") end)
I do not understand what is the player object is supposed to be, I tried multiple things, But none of them worked, Anyone can help me out?
In the developer wiki, it uses Player.PlayerAdded
. I don't know if it would work in your situation, but you could also say something like this:
local players = game.Players for i, v in ipairs(players) do UnequipEvent:FireClient(v) --I didn't indent it because then you would have to replace the spaces with tabs. end
If you don't think these would work in your circumstance, try using a localscript.
I hope this helps!
I must thank RhyRocksRules for the help, but in the first line the script should've done players:GetPlayers() , Which I thank xinfinityBear for the help, I'll leave the script here for anyone who might need it.
local UnequipEvent = game.ReplicatedStorage.Folder.Unequipped local Tool = script.Parent.Parent local Players = game:GetService("Players") local player = game.Players.LocalPlayer Tool.Unequipped:Connect(function() local players = game.Players:GetPlayers() for i, v in ipairs(players) do UnequipEvent:FireClient(players:GetPlayers()) print("Yes") end end)