Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a game pass that makes a player twice their size?

Asked by 4 years ago

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.

0
Question. Is it a local or a normal script? 3F1VE 257 — 4y
0
Normal Script Inside of ServerScriptService. bulder251 26 — 4y
0
It doesn't look like it's a normal script inside of ServerScriptService. You're using "game.Players.LocalPlayer" to reference the player... Rinpix 639 — 4y
0
Well I have my players spawn in with a StartingCharacter? bulder251 26 — 4y

1 answer

Log in to vote
0
Answered by
Rinpix 639 Moderation Voter
4 years ago

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.

01local MS = game:GetService("MarketplaceService")
02local ID = 10136218
03 
04local desc = Instance.new("HumanoidDescription")
05 
06-- Modify the properties you want here
07desc.DepthScale = 2
08desc.HeightScale = 2
09desc.WidthScale = 2
10 
11game.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
18end)

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.

0
Hello I really do appreciate your help and I have followed all your steps, however it did not work! Thank you though. bulder251 26 — 4y
0
I don't see why it wouldn't work. Odd. Rinpix 639 — 4y
Ad

Answer this question