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 3 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 — 3y
0
Normal Script Inside of ServerScriptService. bulder251 26 — 3y
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 — 3y
0
Well I have my players spawn in with a StartingCharacter? bulder251 26 — 3y

1 answer

Log in to vote
0
Answered by
Rinpix 639 Moderation Voter
3 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.

local MS = game:GetService("MarketplaceService") 
local ID = 10136218

local desc = Instance.new("HumanoidDescription")

-- Modify the properties you want here
desc.DepthScale = 2
desc.HeightScale = 2
desc.WidthScale = 2

game.Players.PlayerAdded:Connect(function(plr)
    if (MS:UserOwnsGamePassAsync(plr.UserId, ID)) then
        plr.CharacterAdded:Connect(function(chr)
            local humanoid = chr:WaitForChild("Humanoid")
            humanoid:ApplyDescription(desc)
        end)
    end
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.

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 — 3y
0
I don't see why it wouldn't work. Odd. Rinpix 639 — 3y
Ad

Answer this question