How on earth do you expect us to answer your question accurately?
Fundamentally intellectual property protection laws can vary greatly from country to country. Along with how zealously the holder of those rights is in enforcing any perceived infringement upon their property rights, adding another layer of complexity.
Furthermore, you haven't told us which IP you're making a fan game of, nor whether or not you are intending it to be a parody or satire of the IP, which can also change whether or not you will have a problem.
Finally, you are calling it a "sample", suggesting you intend to put a great deal more into it, yet you aren't telling us what that great deal more even is.
I could tell you your project will be fine, or that your project won't be fine; but truthfully you aren't providing the necessary information to even begin to give you an accurate assessment. & the simple fact of the matter is, is that "I heard X from some internet random", in no way mitigates or negates your potential legal liability.
Furthermore, the mods are probably going to move your thread or close it entirely; because it's effectively a project thread where you are asking for feedback. But you haven't provided any of the necessary elements for a project thread, which by the way would be very good information to provide, if you expect people to take the time to play your demo.