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

How To Change Leg size? [closed]

Asked by
RM0d 305 Moderation Voter
10 years ago

TL;tr making rpg races and I need to make drawfs. (leg size 1,1,1)

1local player = workspace:FindFirstChild("Player") or nil
2if player then
3 
4player["Left leg"].Size = Vector3.new(1,1,1)
5 
6end

it makes the leg disappear... BUT I want the leg to still process animations.

:ANSWER

01game.Players.PlayerAdded:connect(function(plyr)
02    plyr.CharacterAdded:connect(function(char)
03if char then
04    local ver = Vector3.new(1,1.4,1)
05    char["Left Leg"].FormFactor ="Custom"
06    char["Right Leg"].FormFactor ="Custom"
07char["Left Leg"].Size =ver
08char["Right Leg"].Size = ver
09char.Torso["Left Hip"].C0 = CFrame.new(-1, char["Left Leg"].Size.Y* -0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
10char.Torso["Right Hip"].C0 = CFrame.new(1, char["Left Leg"].Size.Y* -0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
11 
12char:MakeJoints()
13 
14end
15    end)
16end)

Makes the player smaller thanks to LordDragonZord

Locked by EzraNehemiah_TF2, Redbullusa, and BlueTaslem

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

2 answers

Log in to vote
1
Answered by 10 years ago
1local player = workspace:FindFirstChild("Player") or nil
2if player then
3 
4player["Left Leg"].Size = Vector3.new(1,1,1)
5player:MakeJoints()
6end

This script will change the Players leg and weld it so it doesn't fall off.

1game.Players.PlayerAdded:connect(function(plyr)
2    plyr.CharacterAdded:connect(function(char)
3if char then
4char["Left Leg"].Size = Vector3.new(1,1,1)
5char:MakeJoints()
6end
7    end)
8end)

This will change the players leg size as soon as they join the game. BTW it looks funny so you should find a way to move the leg up a bit.

0
Thanks" char:MakeJoints()" was the bit I was looking for. RM0d 305 — 10y
Ad
Log in to vote
1
Answered by 10 years ago

I'm not sure if you have to disable animation, but I would do that anyways. 1 - Disable animation script. 2 - Resize the leg 3 - Re weld the leg back to the torso 4 - Enable animation script.