Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I want to make a r15 scaling script?

function onPlayerEntered(player) repeat wait (0.5) until player.Character ~= nil player.Character.Humanoid.BodyDepthScale.Value = 0.69999999999999995559 player.Character.Humanoid.BodyHeightScale.Value =0.5999999999999999778 player.Character.Humanoid.BodyWidthScale.Value = 0.5 player.Character.Humanoid.HeadScale.Value = 0.69999999999999995559 end game.Players.PlayerAdded:connect(onPlayerEntered)

How can I make this only work for certain people in my group, for example, the leader and the 2ic etc. Basically make it so you have to be a rank before it even changes the character scaling? Also i believe the size goes away if you die...

2 comments

0

Use Code Block to make your script more organized:)

0

uh im sorta a noob, I just do small scripts, but do you have the answer to my question

1 answer

Very simple. You need to get your rank from group:

function onPlayerEntered(player) repeat wait (0.5) until player.Character ~= nil 

if player:GetRankInGroup(id_of_group_here) == rank_number_here then
player.Character.Humanoid.BodyDepthScale.Value = 0.69999999999999995559 player.Character.Humanoid.BodyHeightScale.Value =0.5999999999999999778 player.Character.Humanoid.BodyWidthScale.Value = 0.5 player.Character.Humanoid.HeadScale.Value = 0.69999999999999995559
end 
end 
game.Players.PlayerAdded:connect(onPlayerEntered)

For more info: https://wiki.roblox.com/index.php?title=API:Class/Player/GetRankInGroup

This discussion is preserved as it was. New answers, comments, and votes are closed.