There was an error when I wanted to pass getchildren in fireclient, and it said "FireClient: Player argument must be a player object". I changed the data to just Score which was in player (which I already declared via other remote events) because I thought since it was a descendant from player it would be considered a player object. WRONG. What do I do?
The way you can solve this is in the following code:
--Script local remoteEvent = game.ReplicatedStorage:WaitForChild("RemoteEvent") game.Players.PlayerAdded:Connect(function(player) --this parameter is the player object remoteEvent:FireClient(player) end) -- ========================================== --LocalScript local remoteEvent = game.ReplicatedStorage.RemoteEvent local player = game.Players.LocalPlayer remoteEvent.OnClientEvent:Connect(function() --YourCode end)
If this works for you, make this the solution.