Executable in game scripts not working?

So basically, I decided to try and make a script executor (Not for exploiting but just for fun) and I’ve run into a problem. In my script, it keeps saying that there is a nil value and I think it’s because of the empty parentheses. I looked up tutorials and all of them are basically the same. I don’t know how to fix it because it works for everyone else who does it.
here is my code

script.Parent.OnServerEvent:Connect(function(player,text)
	require(script.Loadstring)(text)()
end)

Are you certain that the function which require returns, actually returns a function itself?

Yes because i’m doing the same thing as the tutorials that showed the script working. I’m also using the same script

Never mind I solved it. I made a silly mistake where i was getting the wrong text box.