Why is this no string?[Solved]

Hello developers,
I made a notification system, where clients can send RemoteEvents to the server, the server sends it back to the client, and a notification is shown. Everything works perfectly, but I tried setting this message as a notification:

local notification = "You picked up an item."

And it gives me this error:

 Unable to assign property Text. string expected, got Instance.

I tried it with other messages, and everything worked perfectly. What is the issue here? Am I just not realizing something? Any help is greatly appreaciated! :slight_smile:

If anyone wants the full scripts, here they are:
Script that sends the notification:

local notification = "You picked up an item."
local colora = 1
local colorb = 1
local colorc = 1
local tme = 5
game.ReplicatedStorage.NotificationEvent:FireServer(player, notification, colora, colorb, colorc, tme)
	end
end)

The server script:

game.ReplicatedStorage.NotificationEvent.OnServerEvent:Connect(function(player, notification, colora, colorb ,colorc, tme)
	game.ReplicatedStorage.NotificationEvent:FireClient(player, notification, colora, colorb ,colorc, tme)
end)

The script inside the notification frame:

notificationallclientsevent.OnClientEvent:Connect(function(notification, colora, colorb, colorc, tme)
	local clone = notificationframe:Clone()
	if notification == "" then
		clone.AnimationFrame.Notification.Text = "Notification could not be loaded."
	else
		clone.AnimationFrame.Notification.Text = notification
	end

(The rest of the scripts aren’t important.)
Thanks in advance! :smiley:

Remove player from fire server, player is given automatically and you can see read it in the documentation.

For whatever reason it works now… I guess I didn’t realize that. Thanks for helping! (Even though I still don’t understand why it works now because I used that method before, but whatever.) I’m gonna go ahead and close this then. Thanks!

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