Need help with script and local script?

local ServerSettings = game:GetService("Workspace"):WaitForChild("ServerSettings")
local MiniGamePlayerCurrent = ServerSettings.MiniGamePlayerCurrent
ServerSettings.FinishedGame.Changed:Connect(function()
	if ServerSettings.FinishedGame.Value == true then
		for IndexPlayer, Player in pairs(game.Players:GetChildren()) do
			if Player.HiddenValues.OnMiniGame.Value == true then
				print(Player)
				game.ReplicatedStorage.GuiEvents.Winners:FireAllClients(Player,"PlayerText")
				MiniGamePlayerCurrent.Value = MiniGamePlayerCurrent.Value + 1
			end
			coroutine.wrap(function()
				for IndexText, Text in pairs(script.Parent.Leaderboard:GetChildren()) do
					print(Text)
					game.ReplicatedStorage.GuiEvents.Winners:FireAllClients(Text,"TextType")
				end	
			end)()
		end
	end
end)

this script prints =rintos

local script:

local MiniGamePlayerCurrent = game:GetService("Workspace"):WaitForChild("ServerSettings").MiniGamePlayerCurrent
game.ReplicatedStorage.GuiEvents.Winners.OnClientEvent:Connect(function(Player,TextLabel,Type)
	print(tostring(Type,Player,TextLabel.." :Client"))
	if Type == "PlayerText" then
		print(tostring(Type,Player,TextLabel))
	elseif Type == "TextType" then
		print(tostring(Type,Player,TextLabel))
	end
	script.Parent.Parent.Enabled = true
	for c=0,MiniGamePlayerCurrent.Value,1 do

	end
end)

this local script prints nil why?: client

I believe it is because you dont set “Type” as something so it just becomes nil when you try and print it

Remove the Player from the OnClientEvent, you only have to do that for OnServerEvent because you cna easily get the player from a local script via the LocalPlayer.

Also tostring only expects 1 argument, if you give it more than one, it’ll only return the the first thing you pass into it as a string

print(tostring(15, 65)) --would only print 15