How to set a value in table with a function

i assume u just need to change script.remoteEvent to script:WaitForChild(“remoteEvent”)