Unable to assign property Text. string expected, got nil

Hi, i am trying to make Ending UI but i am facing a problem.

So basically i fired an Remote Event from the server, and writed my ending name there but it does not work, here is the scripts:

Server:

EndingEvent:FireClient(player, "ENDING NAME")

Client:

EndingEvent.OnClientEvent:Connect(function(Player, EndingTitle)
	EndingFrame.Visible = true
	EndingFrame.EndingTitle.Text = EndingTitle
	StopSoundSFXS()
	EndingMusic:Play()
end)

Output:

Unable to assign property Text. string expected, got nil  -  Client - EndingScript

OnClientEvent doesn’t have a player variable like the server does, because it’s not needed. Instead you can fetch the player through game.Players.LocalPlayer. To fix the issue just do:

EndingEvent.OnClientEvent:Connect(EndingTitle) --not Player
	--rest of your code
end)
1 Like

Oh my god i wasted my 2 hours to fix that, thank u so much you are a lifesaver!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.