Transferring data using remote events

Hello, I’m trying to make an ending system similar to get a snack at 4 am’s. But I’m having trouble with sending data such as the ending name and description through the remote event. Any help?

Server script: (In Proximity Prompt)

script.Parent.Triggered:Connect(function()
	local Player = game.Players:FindFirstChildWhichIsA("Player")
	
	local EndingName = "Test Ending"
	local EndingDesc = "Test Description"
	
	game.ReplicatedStorage.Events.Ending:FireClient(Player, EndingName, EndingDesc)
end)

Local Script: (In ScreenGui)

EndingEvent.OnClientEvent:Connect(function(EndingName, EndingDesc)
	Gui.EndingName = EndingName
	Gui.EndingDesc = EndingDesc
end)

It’s giving me an error saying: “EndingName is not a valid member of Frame”

I’m having a lot of trouble so any help works. Thx!

What is Gui.EndingName are you sure your Gui has EndingName descendant try printing Gui and Gui:FindFirstChild(“EndingName”) before assigning the ending name and find out if it really exists

Sorry for not closing this sooner. I fixed it, turns out I’m an idiot and didn’t put “.Text” after “Gui.EndingName” Thx anyways!

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