Hello!
The comments on this question clearly answer your issue but if you are waiting for an "answer post" well here is one.
First of all, let's start off with the issue. The current issue is when you do :FireClient() you didn't specify which client, every player is basically another client. So what you want to do is put the player variable as the first Argument.
game.ReplicatedStorage.ItemWon.OnServerEvent:Connect(function(player, ItemWon)
print(ItemWon)
ItemWon = 463374854
wait()
game.ReplicatedStorage.ItemWonn:FireClient(player, ItemWon)
end)
Now in the client:
game.ReplicatedStorage.ItemWonn.OnClientEvent:Connect(function(ItemWon)
print("aaaa")
print(ItemWon)
Item = ItemWon
Check()
end)
Now, here is a suggestion from RubenKan which would be really helpful, if you're sending something to the Server and want it to send it back then what you want to do is use a RemoteFunction.
I won't be explaining how to use them since I already answered your question. More information can be found on RemoteFunctions here:
http://wiki.roblox.com/index.php?title=API:Class/RemoteFunction
Hopefully, this helped!
Best of luck developer!
2 comments
FireClient one. You need to specify whose client, It needs mainly the parameter of a player FireClient(player); It's a must
If you're going to return something i'd suggest using a remote function, that way you can do local Variable = RemoteFunction:FireServer(Args) and on the server you can do OnServerInvoke = function(Player,Args) return Variable end