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

Is Size broken?

Asked by 9 years ago

I made an arm script for my gun recently and the script works fine. But the problem is the fact the size no matter what i put the size stays the same. I can't see whats wrong with it, Can someone help me?

Here is the code.

Tool = script.Parent
local yes = false
local larm = Tool.Parent:FindFirstChild("Left Arm")
local rarm = Tool.Parent:FindFirstChild("Right Arm")
local model = Instance.new("Model",game.Workspace)


Tool.Equipped:connect(function()    
wait(.01)
if yes == false then
    yes = true
model.Name = "Arms"
local RArm = Instance.new("Part")
RArm.Name = "Right Arm"
RArm.FormFactor = "Symmetric"
RArm.TopSurface = "Smooth"
RArm.BottomSurface = "Smooth"
RArm.Size = Vector3.new(0.9, 0.9, 0.9)
RArm.BrickColor = BrickColor.new("Pastel brown")
RArm.CanCollide = false
RArm.Parent = model
local RArmWeld = Instance.new("Weld",RArm)
RArmWeld.Part0 = rarm
RArmWeld.Part1 = RArm

local LArm = Instance.new("Part")
LArm.FormFactor = "Symmetric"
LArm.TopSurface = "Smooth"
LArm.BottomSurface = "Smooth"
LArm.Name = "Left Arm"
LArm.Size = Vector3.new(0.9, 0.9, 0.9)
LArm.BrickColor = BrickColor.new("Pastel brown")
LArm.CanCollide = false
LArm.Parent = model
local LArmWeld = Instance.new("Weld",LArm)
LArmWeld.Part0 = larm
LArmWeld.Part1 = LArm

Tool.Unequipped:connect(function()
if yes == true then
    yes = false
        LArm:Remove()
        RArm:Remove()
        end
        end)
    end
end)

0
Try setting the FormFactor to Custom. MechaScripter 35 — 9y

1 answer

Log in to vote
0
Answered by
Im_Kritz 334 Moderation Voter
9 years ago

The problem here is that Symmetric FormFactor does not allow you to change the size below (1,1,1). To fix this change the FormFactor to Custom.

Tool = script.Parent
local yes = false
local larm = Tool.Parent:FindFirstChild("Left Arm")
local rarm = Tool.Parent:FindFirstChild("Right Arm")
local model = Instance.new("Model",game.Workspace)


Tool.Equipped:connect(function()    
wait(.01)
if yes == false then
    yes = true
model.Name = "Arms"
local RArm = Instance.new("Part")
RArm.Name = "Right Arm"
RArm.FormFactor = "Custom"
RArm.TopSurface = "Smooth"
RArm.BottomSurface = "Smooth"
RArm.Size = Vector3.new(0.9, 0.9, 0.9)
RArm.BrickColor = BrickColor.new("Pastel brown")
RArm.CanCollide = false
RArm.Parent = model
local RArmWeld = Instance.new("Weld",RArm)
RArmWeld.Part0 = rarm
RArmWeld.Part1 = RArm

local LArm = Instance.new("Part")
LArm.FormFactor = "Custom"
LArm.TopSurface = "Smooth"
LArm.BottomSurface = "Smooth"
LArm.Name = "Left Arm"
LArm.Size = Vector3.new(0.9, 0.9, 0.9)
LArm.BrickColor = BrickColor.new("Pastel brown")
LArm.CanCollide = false
LArm.Parent = model
local LArmWeld = Instance.new("Weld",LArm)
LArmWeld.Part0 = larm
LArmWeld.Part1 = LArm

Tool.Unequipped:connect(function()
if yes == true then
    yes = false
        LArm:Remove()
        RArm:Remove()
        end
        end)
    end
end)


0
Thank you :)! I'm sorry about the super late response. My computer broke and had to get a new one. purplemetro3421 5 — 9y
Ad

Answer this question