Hello fellow developers and friends! I am interested as to how I can correctly make a game pass make a player twice their size in game if they own the game pass. I inserted a script into ServerScriptService. Here is what I wrote:
local MS = game:GetService("MarketplaceService") local ID = 10136218
if MS:UserOwnsGamePassAsync(game.Players.LocalPlayer.UserId, ID) then wait(1) game.Players.LocalPlayer.Character.Humanoid.HeadScale = 2 game.Players.LocalPlayer.Character.Humanoid.BodyWidthScale = 2 game.Players.LocalPlayer.Character.Humanoid.BodyHeightScale = 2 game.Players.LocalPlayer.Character.Humanoid.BodyDepthScale = 2 end
It does not work and the output does not output anything? If anyone could help that would mean a life saver to me! Thanks.
I would consider using a HumanoidDescription.
... and the feature that allows you to create code blocks.
... and a regular script.
Put this in a regular script inside of ServerScriptService.
01 | local MS = game:GetService( "MarketplaceService" ) |
02 | local ID = 10136218 |
03 |
04 | local desc = Instance.new( "HumanoidDescription" ) |
05 |
06 | -- Modify the properties you want here |
07 | desc.DepthScale = 2 |
08 | desc.HeightScale = 2 |
09 | desc.WidthScale = 2 |
10 |
11 | game.Players.PlayerAdded:Connect( function (plr) |
12 | if (MS:UserOwnsGamePassAsync(plr.UserId, ID)) then |
13 | plr.CharacterAdded:Connect( function (chr) |
14 | local humanoid = chr:WaitForChild( "Humanoid" ) |
15 | humanoid:ApplyDescription(desc) |
16 | end ) |
17 | end |
18 | end ) |
I didn't test it but I don't see why it wouldn't work.
Whenever you join the game, if you own this particular game pass, you will be scaled whenever you spawn in.