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

How do I make a script that scales a model?

Asked by
OldBo5 30
6 years ago

Here is the code I am currently trying it with:

local plr = game.Players.LocalPlayer.Character
script.Parent.MouseButton1Click:connect(function()
plr["Right Leg"].Size = Vector3.new(2.673, 5.347, 2.673)
plr["Left Leg"].Size = Vector3.new(2.673, 5.347, 2.673)
plr["Right Arm"].Size = Vector3.new(2.673, 5.347, 2.673)
plr["Left Arm"].Size = Vector3.new(2.673, 5.347, 2.673)
plr["ColorfulStrawHat"].Size = Vector3.new(3.743, 1.604, 5.347)
plr["Ultra-Fabulous Hair"].Size = Vector3.new(5.347, 5.347, 5.347)
plr["Right Leg"].Anchored = true
plr["Left Leg"].Anchored = true
plr["Right Arm"].Anchored = true
plr["Left Arm"].Anchored = true
end)

I am making a button that scales the player, but I need help.

2 answers

Log in to vote
0
Answered by
HLVM 27
6 years ago

I found something on the devforum Here

Hope it helps :)

0
That is a R15 Scaling tutorial, I am talking about in-game not with my avatar with code. OldBo5 30 — 6y
0
This IS ingame script. Scroll down and click example code :) HLVM 27 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

If that original script was a server script then ... You should've used a local script But if you wanted to use it with a Server script then I would do

local button = script.Parent
button.MouseButton1Click:Connect(function(hit) -- connect is depricated
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
local char = hit.Parent
char["Right Leg"].Size = Vector3.new(2.673, 5.347, 2.673)
char["Left Leg"].Size = Vector3.new(2.673, 5.347, 2.673)
char["Right Arm"].Size = Vector3.new(2.673, 5.347, 2.673)
char["Left Arm"].Size = Vector3.new(2.673, 5.347, 2.673)
char["ColorfulStrawHat"].Size = Vector3.new(3.743, 1.604, 5.347)
char["Ultra-Fabulous Hair"].Size = Vector3.new(5.347, 5.347, 5.347)
char["Right Leg"].Anchored = true
char["Left Leg"].Anchored = true
char["Right Arm"].Anchored = true
char["Left Arm"].Anchored = true
end)

Hopefully this fixes your problem :)

Answer this question