This is my script:
file = loadfile("C:/local.lua")
file()
I coped this from the roblox Function dump/Functions specific to Roblox and only changed the file to load but when I run the script I get an error "An error occured" and an error line under the word 'loadfile' in the script editor - error: W002: Global 'loadfile' is deprecated. Is there a way to fix this?

1 comment
Nope. It's at a higher context for a reason.