I managed to find out how to do that and it works now but for some reason I get these errors:
And this is the code I made