I'm going to make a joke to a girl who goes to my school
What kind of joke are you going to make?
I'm going to make a joke about her weight problem.
If you are going to joke about her weight then you are going to get smacked. I bet you 100% that she will find the joke offensive because girls are sensitive to their weight and this is not something you want to joke about.
I'm trying to be nice but she might just take it personally.
I think that you should think of something else to joke about. Just because you think that it is funny, does not mean everyone else will.