of     1   

ninjaflakes
#139368661Sunday, July 06, 2014 12:33 AM GMT

Hello, I made a GUI button that is suppose to advance your stage by 1 if you buy a developer product. It is not working. The lase "end" is erroring. Also, how could I make it where the max stage is 5. (There are only 5 stages) Thank you in advance. Script: local MarketplaceService = Game:GetService("MarketplaceService") local buyButton = script.Parent local productId = 20392847 local player = script.Parent.Parent.Parent.Parent -- Parent as the player. local pointsToAward = PointsService:GetAwardablePoints() local universeBalance = PointsService:GetGamePointBalance(player.userId) buyButton.MouseButton1Click:connect(function() MarketplaceService:PromptProductPurchase(player, productId) game.Players.LocalPlayer.leaderstats.Stage.Value = game.Players.LocalPlayer.leaderstats.Stage.Value + 1 end end)
TwentyTwoPilots
#139370503Sunday, July 06, 2014 12:53 AM GMT

local MarketplaceService = Game:GetService("MarketplaceService") local buyButton = script.Parent local productId = 20392847 local player = script.Parent.Parent.Parent.Parent -- Parent as the player. local pointsToAward = PointsService:GetAwardablePoints() local universeBalance = PointsService:GetGamePointBalance(player.userId) buyButton.MouseButton1Click:connect(function() s = game.Players.LocalPlayer.leaderstats.Stage if s.Value < 5 then MarketplaceService:PromptProductPurchase(player, productId) s.Value = s.Value + 1 end end) I am an eggspert in the eggcelent art of egg puns

    of     1