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

Why wont my scripts body height prevention work?

Asked by 3 years ago

This is the code:

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
local Humanoid = Character:WaitForChild("Humanoid")
local BDS = Humanoid:FindFirstChild('BodyDepthScale')
local BWS = Humanoid:FindFirstChild('BodyWidthScale')
local BHS = Humanoid:FindFirstChild('BodyHeightScale')
local head = Humanoid:FindFirstChild('HeadScale')
if BHS == 1 then end
script.Parent.MouseButton1Click:connect(function()
    BDS.Value = BDS.Value - .05
    BWS.Value = BWS.Value - .05
    BHS.Value = BHS.Value - .1
    head.Value = head.Value - .03
end)

The only part that doesn't work is the "if BHS == 1 then end" This is there in order to keep the player from making himself shorter than 1, however, it will not work. Was wondering if anyone could help me out, please and thank you!

Answer this question