Check out example codes for "Remote functions and events example in lua". It will help you in understanding the concepts better.

Code Example 1

local NewBlewPart = game.Workspace.Neon --Make a Part and name i To "Neon"

NewBlewPart.Touched:Connect(function()
	print("You Touched Me!") --Says a Dialogue When Touched The Part "NewBlewPart" Which is Just a Variable For a Base Part. 
	wait(1)
	end) --Script Officially Made By Rigby#9052 on Discord

Learn ReactJs, React Native from akashmittal.com