So I basically have a button inside a screenGUI in starterGUI in which is a localscript (in the button). I want to make a gamepass where if its clicked you shrink in size like described. Only whenever i press the button in studios i dont shrink and i dont get any errors.... Anyone knows whats wrong?
local player = game.Players.LocalPlayer
local button = script.Parent
local MarketPlaceService = game:GetService("MarketplaceService")
local id = 18020349
script.Parent.MouseButton1Click:Connect(function()
game:GetService("MarketplaceService"):PromptGamePassPurchase(player, id)
game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
if purchased and id == ido then
player.Character.Humanoid.HeadScale.Value = 0.5
player.Character.Humanoid.BodyDepthScale.Value = 0.5
player.Character.Humanoid.BodyWidthScale.Value = 0.5
player.Character.Humanoid.BodyHeightScale.Value = 0.5
end
end)
end)

1 comment
I also tried putting this in the ServerScriptService: local id = 18020349 local player = game.Players.LocalPlayer game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased) if purchased and id == ido then player.Character.Humanoid.HeadScale.Value = 0.5 player.Character.Humanoid.BodyDepthScale.Value = 0.5 player.Character.Humanoid.BodyWidthScale