generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

"Grow"

Previous Thread :: Next Thread 
billybobtijoseph is not online. billybobtijoseph
Joined: 09 Dec 2011
Total Posts: 2163
19 Nov 2017 07:57 AM
Anyone know how I can make a "grow" script like many simulator games use?
Report Abuse
farizarps is not online. farizarps
Joined: 22 Aug 2014
Total Posts: 27
19 Nov 2017 08:01 AM
Try using CloneTrooper1019's character scale script: ################################### May the mass times acceleration be with you.
Report Abuse
farizarps is not online. farizarps
Joined: 22 Aug 2014
Total Posts: 27
19 Nov 2017 08:30 AM
#### ## / J2wxNz May the mass times acceleration be with you.
Report Abuse
farizarps is not online. farizarps
Joined: 22 Aug 2014
Total Posts: 27
19 Nov 2017 08:32 AM

Here it is:

function scaleCharacter(model,scale)
if not model or not scale then return end
if not _G.ScaleCons then
_G.ScaleCons = {}
end
if _G.ScaleCons[model] then
_G.ScaleCons[model]:disconnect()
end
local joints = {}
local parts = {}
local h = model:findFirstChild("Humanoid")
if h then
h.Parent = nil
end
local function handleHat(hat)
if hat:findFirstChild("GotScaled") then return end
Instance.new("Flag",hat).Name = "GotScaled"
Spawn(function ()
local h = hat:WaitForChild("Handle")
local m = h:WaitForChild("Mesh")
m.Scale = m.Scale * scale
end)
local yInc = (scale-1)*.5
hat.AttachmentPos = (hat.AttachmentPos * scale) - (hat.AttachmentUp * Vector3.new(yInc,yInc,yInc))
end
for _,v in pairs(model:GetChildren()) do
if v:IsA("BasePart") then
table.insert(parts,v)
v.Anchored = true;
v.FormFactor = "Custom";
for _,j in pairs(v:GetChildren()) do
if j:IsA("Motor6D") then
local t = {
Name = j.Name;
Parent = v;
Part0 = j.Part0;
Part1 = j.Part1; C0## #.##### # C1## #.##### }
table.insert(joints,t)
j:Destroy()
end
end
elseif v:IsA("Hat") then
handleHat(v)
end
end
for _,v in pairs(parts) do
#v.Size = v.Size * scale
v.Anchored = false
end
for _,j in pairs(joints) do
local c0 = {j.C0:components()}
local c1## #j###################
for i = 1,3 do
c0[i] = c0[i] * scale
c1[i] = c1[i] * scale
end
j.C0 = CFrame.new(unpack(c0)) j.#### CFrame.new(unpack(c1))
local n = Instance.new("Motor6D")
for k,v in pairs(j) do
n[k] = v

end
end
model.ChildAdded:connect(function (c)
if c:IsA("Hat") then
handleHat(c)
end
end)
if h then
h.Parent = model
h.WalkSpeed = 16 * scale
h.MaxHealth = 100 * scale
h.Health = (h.Health/h.MaxHealth)*(100*scale)
end
_G.ScaleCons[model] = con
end

Hope this helps

May the mass times acceleration be with you.
Report Abuse
billybobtijoseph is not online. billybobtijoseph
Joined: 09 Dec 2011
Total Posts: 2163
19 Nov 2017 08:36 AM
Oh thanks! Some of it it tagged tho?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image