Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is Size broken?

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)

1 comment

0

Try setting the FormFactor to Custom.

1 answer

✓ Accepted answer

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)


1 comment

0

Thank you :)! I'm sorry about the super late response. My computer broke and had to get a new one.

This discussion is preserved as it was. New answers, comments, and votes are closed.