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

I want to make a r15 scaling script?

Asked by 6 years ago

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...

0
Use Code Block to make your script more organized:) iSvenDerp 233 — 6y
0
uh im sorta a noob, I just do small scripts, but do you have the answer to my question Kaize_Kun 0 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

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

Ad

Answer this question