Hello, I MCPE11 have thought that ceating an RPG (RolePlayGame) would be a great idea. The goal of this game is to kill NPC's to collect Gold and XP (Experience). Once you have enough XP you will level up. The one thing I am having trouble making is a code that will make your Rebirths (Value In Leaderstats) Go up by one. I would like for there to be a gui and when you click it, if the level in your leaderstats is level 300+ you will gain a rebirth level, your level will become 1 again, gold set to 0, xp set to 0, and all weapons cleared. In the end your character will be killed.

PM me on roblox for more info. I can show you a few games that have this system if you want to know what it looks like a bit more!

I tried making this script myself, but it never seemed to work. The if variable seemed to mess it up.

If script.Parent.Parent.Parent.Parent.leaderstats.Level.Value>=300 then

The rest would work fine until I added this

3 comments

1

You need to include more context. This one line of code tells us nothing.

1

Could you show the entire script? Also, the 'i' in "if" must NOT be capital if you did capitalize it!

0

"if" is a reserved keyword. For this reason, you cannot name a variable "if".