How to add else?

local Tool = script.Parent;
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local h = char:WaitForChild("Humanoid")
local open = h:LoadAnimation(script.Parent:WaitForChild("OpenAnim"))
local drink = h:LoadAnimation(script.Parent:WaitForChild("DrincAnim"))
local small = false
local cooldown = true

function onEquipped()
	open:Play()
end

function onActivated()
	function
end
	

function onActivated()
	if cooldown == true then
		cooldown = false
		drink:Play()
		if small == true then
			wait()
			small = false
			cooldown = true
			for i,Child in pairs(h:GetChildren()) do
				if Child.Name == 'BodyDepthScale' then
					Child.Value = 1 -- Size Of Players Depth
				elseif Child.Name == 'HeadScale' then
					Child.Value = 1 -- Size Of Players Head
				elseif Child.Name == 'BodyHeightScale' then
					Child.Value = 1 -- Size Of Players Height
				elseif Child.Name == 'BodyWidthScale' then
					Child.Value = 1 -- Size Of Players THICCness
				end
			end
		end

		if small == false then
			wait()
			small = true
			cooldown = true
			for i,Child in pairs(h:GetChildren()) do
				if Child.Name == 'BodyDepthScale' then
					Child.Value = 0.2 -- Size Of Players Depth
				elseif Child.Name == 'HeadScale' then
					Child.Value = 0.2 -- Size Of Players Head
				elseif Child.Name == 'BodyHeightScale' then
					Child.Value = 0.2 -- Size Of Players Height
				elseif Child.Name == 'BodyWidthScale' then
					Child.Value = 0.2 -- Size Of Players THICCness
				end
			end
		end
	end
end



script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)

I have this but idk how to use else. due to the fact that I do not use “else” an error occurs

if small == false then
if small == true then

I need replace it with “else”

Like this?

if small == true then

else

end

Yes. but due to the fact that something is wrong it does not work

What is this function? You might have added mistakely perhaps. Is there any error in the output?

Yes. do not pay attention to it. I deleted it


image
idk why it is don’t working…

image
“Else” for some reason starts to refer to “elseif”, and not to “if small == true”

You forgot to add end at the end of the first group of elseif statements.