I’ve made a character creation screen, I want the user to be able to change their weight, this works the first time but then doesn’t work any other times, could anyone please help?
script.Parent.Next.MouseButton1Click:Connect(function()
wait(0.25)
local MaleDummy = game.Workspace.Main.Male
local FemaleDummy = game.Workspace.Main.Female
local CurrentWeight = script.Parent.Parent.Parent.Values.Weight
local CurrentGender = script.Parent.Parent.Parent.Values.Gender.Value
--[[if CurrentGender == 'Male' and CurrentWeight.Value <= 1.15 then
print('a')
MaleDummy.Humanoid.BodyWidthScale.Value += 0.015
CurrentWeight.Value += 0.015
elseif CurrentGender == 'Female' then
FemaleDummy.Humanoid.BodyWidthScale.Value += 0.015
CurrentWeight.Value += 0.015
end--]]
if CurrentWeight.Value == '150lbs' then
if CurrentGender == 'Male' then
MaleDummy.Humanoid.BodyWidthScale.Value = 1
CurrentWeight.Value = '160lbs'
elseif CurrentGender == 'Female' then
FemaleDummy.Humanoid.BodyWidthScale.Value = 1
end
elseif CurrentWeight.Value == '140lbs' then
if CurrentGender == 'Male' then
MaleDummy.Humanoid.BodyWidthScale.Value = 0.975
CurrentWeight.Value = '150lbs'
elseif CurrentGender == 'Female' then
FemaleDummy.Humanoid.BodyWidthScale.Value = 0.975
end
elseif CurrentWeight.Value == '130lbs' then
if CurrentGender == 'Male' then
MaleDummy.Humanoid.BodyWidthScale.Value = 0.95
CurrentWeight.Value = '140lbs'
elseif CurrentGender == 'Female' then
CurrentWeight.Value = '140lbs'
FemaleDummy.Humanoid.BodyWidthScale.Value = 0.95
end
elseif CurrentWeight.Value == '120lbs' then
if CurrentGender == 'Male' then
CurrentWeight.Value = '130lbs'
MaleDummy.Humanoid.BodyWidthScale.Value = 0.925
elseif CurrentGender == 'Female' then
FemaleDummy.Humanoid.BodyWidthScale.Value = 0.925
end
elseif CurrentWeight.Value == '160lbs' then
if CurrentGender == 'Male' then
CurrentWeight.Value = '170lbs'
MaleDummy.Humanoid.BodyWidthScale.Value = 1.025
elseif CurrentGender == 'Female' then
CurrentWeight.Value = '170lbs'
FemaleDummy.Humanoid.BodyWidthScale.Value = 1.025
end
elseif CurrentWeight.Value == '170lbs' then
if CurrentGender == 'Male' then
CurrentWeight.Value = '180lbs'
MaleDummy.Humanoid.BodyWidthScale.Value = 1.05
elseif CurrentGender == 'Female' then
CurrentWeight.Value = '180lbs'
FemaleDummy.Humanoid.BodyWidthScale.Value = 1.05
end
elseif CurrentWeight.Value == '180lbs' then
if CurrentGender == 'Male' then
CurrentWeight.Value = '190lbs'
MaleDummy.Humanoid.BodyWidthScale.Value = 1.075
elseif CurrentGender == 'Female' then
CurrentWeight.Value = '190lbs'
FemaleDummy.Humanoid.BodyWidthScale.Value = 1.075
end
elseif CurrentWeight.Value == '190lbs' then
if CurrentGender == 'Male' then
CurrentWeight.Value = '200lbs'
MaleDummy.Humanoid.BodyWidthScale.Value = 1.1
elseif CurrentGender == 'Female' then
FemaleDummy.Humanoid.BodyWidthScale.Value = 1.1
CurrentWeight.Value = '200lbs'
end
elseif CurrentWeight.Value == '200lbs' then
CurrentWeight.Value = '210lbs'
if CurrentGender == 'Male' then
MaleDummy.Humanoid.BodyWidthScale.Value = 1.125
elseif CurrentGender == 'Female' then
FemaleDummy.Humanoid.BodyWidthScale.Value = 1.125
end
elseif CurrentWeight.Value == '210lbs' then
CurrentWeight.Value = '220lbs'
if CurrentGender == 'Male' then
MaleDummy.Humanoid.BodyWidthScale.Value = 1.15
elseif CurrentGender == 'Female' then
FemaleDummy.Humanoid.BodyWidthScale.Value = 1.15
end
end
MaleDummy.HumanoidRootPart.Anchored = false
FemaleDummy.HumanoidRootPart.Anchored = false
--]]
end)
script.Parent.Previous.MouseButton1Click:Connect(function()
wait(0.25)
local MaleDummy = game.Workspace.Main.Male
local FemaleDummy = game.Workspace.Main.Female
local CurrentWeight = script.Parent.Parent.Parent.Values.Weight
local CurrentGender = script.Parent.Parent.Parent.Values.Gender.Value
--[[if CurrentGender == 'Male' and CurrentWeight.Value >= 0.925 then
MaleDummy.Humanoid.BodyWidthScale.Value -= 0.015
CurrentWeight.Value -= 0.015
elseif CurrentGender == 'Female' then
FemaleDummy.Humanoid.BodyWidthScale.Value -= 0.015
CurrentWeight.Value -= 0.015
end --]]
if CurrentWeight.Value == '150lbs' then
CurrentWeight.Value = '140lbs'
if CurrentGender == 'Male' then
MaleDummy.Humanoid.BodyWidthScale.Value = 1
elseif CurrentGender == 'Female' then
FemaleDummy.Humanoid.BodyWidthScale.Value = 1
end
elseif CurrentWeight.Value == '140lbs' then
CurrentWeight.Value = '130lbs'
if CurrentGender == 'Male' then
MaleDummy.Humanoid.BodyWidthScale.Value = 0.975
elseif CurrentGender == 'Female' then
FemaleDummy.Humanoid.BodyWidthScale.Value = 0.975
end
elseif CurrentWeight.Value == '130lbs' then
CurrentWeight.Value = '120lbs'
if CurrentGender == 'Male' then
MaleDummy.Humanoid.BodyWidthScale.Value = 0.95
elseif CurrentGender == 'Female' then
FemaleDummy.Humanoid.BodyWidthScale.Value = 0.95
end
elseif CurrentWeight.Value == '120lbs' then
CurrentWeight.Value = '110lbs'
if CurrentGender == 'Male' then
MaleDummy.Humanoid.BodyWidthScale.Value = 0.925
elseif CurrentGender == 'Female' then
FemaleDummy.Humanoid.BodyWidthScale.Value = 0.925
end
elseif CurrentWeight.Value == '160lbs' then
CurrentWeight.Value = '150lbs'
if CurrentGender == 'Male' then
MaleDummy.Humanoid.BodyWidthScale.Value = 1.025
elseif CurrentGender == 'Female' then
FemaleDummy.Humanoid.BodyWidthScale.Value = 1.025
end
elseif CurrentWeight.Value == '170lbs' then
CurrentWeight.Value = '160lbs'
if CurrentGender == 'Male' then
MaleDummy.Humanoid.BodyWidthScale.Value = 1.05
elseif CurrentGender == 'Female' then
FemaleDummy.Humanoid.BodyWidthScale.Value = 1.05
end
elseif CurrentWeight.Value == '180lbs' then
CurrentWeight.Value = '170lbs'
if CurrentGender == 'Male' then
MaleDummy.Humanoid.BodyWidthScale.Value = 1.075
elseif CurrentGender == 'Female' then
FemaleDummy.Humanoid.BodyWidthScale.Value = 1.075
end
elseif CurrentWeight.Value == '190lbs' then
CurrentWeight.Value = '180lbs'
if CurrentGender == 'Male' then
MaleDummy.Humanoid.BodyWidthScale.Value = 1.1
elseif CurrentGender == 'Female' then
FemaleDummy.Humanoid.BodyWidthScale.Value = 1.1
end
elseif CurrentWeight.Value == '200lbs' then
CurrentWeight.Value = '190lbs'
if CurrentGender == 'Male' then
MaleDummy.Humanoid.BodyWidthScale.Value = 1.125
elseif CurrentGender == 'Female' then
FemaleDummy.Humanoid.BodyWidthScale.Value = 1.125
end
elseif CurrentWeight.Value == '210lbs' then
CurrentWeight.Value = '200lbs'
if CurrentGender == 'Male' then
MaleDummy.Humanoid.BodyWidthScale.Value = 1.15
elseif CurrentGender == 'Female' then
FemaleDummy.Humanoid.BodyWidthScale.Value = 1.15
end
end
MaleDummy.HumanoidRootPart.Anchored = false
FemaleDummy.HumanoidRootPart.Anchored = false
end)
--]]
--script.Parent.Parent.Back.MouseButton1Click:Connect(function()
--local MaleDummy = game.Workspace.Main.Male
--local FemaleDummy = game.Workspace.Main.Female
--FemaleDummy.Humanoid.BodyWidthScale = 1
--MaleDummy.Humanoid.BodyWidthScale = 1
--end)
script.Parent.Parent.Parent.Finalization.Accept.MouseButton1Click:Connect(function()
local MaleDummy = game.Workspace.Main.Male
local FemaleDummy = game.Workspace.Main.Female
FemaleDummy.Humanoid.BodyWidthScale = 1
MaleDummy.Humanoid.BodyWidthScale = 1
end)