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.
Hey, I saw your script and I found a couple errors in it:
1) Since the script is Client-sided (LocalScript, I knew because LocalPlayer can't be used in a Server-sided script), you should consider changing it to a Server sided script in order for other players to see it
2) The other error i noticed in your script was that you did not specify .Value when giving values to let's say game.Players.LocalPlayer.Character.Humanoid.BodyHeightScale
, a common mistake.
Here should be a Server sided and functioning version of your code:
local MS = game:GetService("MarketplaceService") local ID = 10136218 function playerAdded(player) local function onCharacterAdded(char) if MS:UserOwnsGamePassAsync(player, ID) then wait(1) char.Humanoid.HeadScale.Value = 2 char.Humanoid.BodyWidthScale.Value = 2 char.Humanoid.BodyHeightScale.Value = 2 char.Humanoid.BodyDepthScale.Value = 2 end end player.CharacterAdded:Connect(onCharacterAdded) end game.Players.PlayerAdded:Connect(playerAdded)
If it does not work, then please tell me the output, hope this helps!
Well I could tell you to use this link? :) https://www.youtube.com/watch?v=UYlN5N1Ury0 Is this works please accept the question it would help a ton!