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

how to make a gui frame biger and smaller with a button click?

script.Parent.MouseButton1Click:Connect(function()
  if script.Parent.Parent.Value.Value == true then
   	script.Parent.Text = "Politie?"
script.Parent.Parent.Parent.Frame.Size = UDim2.new{1, 0},{0.2, 0}
	 script.Parent.Parent.desc.Visible = true
	 script.Parent.Parent.join.Visible = true
	script.Parent.Parent.Value.Value = false
  else
    script.Parent.Parent.join.Visible = false
	 script.Parent.Parent.desc.Visible = false
	  script.Parent.Text = "Politie?"
	 script.Parent.Parent.Value.Value = true
	script.Parent.Parent.Parent.Frame.Size = UDim2.new{1, 0},{0.05, 0}
  end
end)

here what i tried doesnt work can anyone help me?

1 comment

0

remove the { }

1 answer

✓ Accepted answer

In UDim2.new you are using {} for tables , you need () and delete the { and }, Here

script.Parent.MouseButton1Click:Connect(function()
  if script.Parent.Parent.Value.Value == true then
    script.Parent.Text = "Politie?"
script.Parent.Parent.Parent.Frame.Size = UDim2.new(1, 0,0.2, 0)
     script.Parent.Parent.desc.Visible = true
     script.Parent.Parent.join.Visible = true
    script.Parent.Parent.Value.Value = false
  else
    script.Parent.Parent.join.Visible = false
     script.Parent.Parent.desc.Visible = false
      script.Parent.Text = "Politie?"
     script.Parent.Parent.Value.Value = true
    script.Parent.Parent.Parent.Frame.Size = UDim2.new(1, 0,0.05, 0)
  end
end)

Hope it works :D

1 comment

0

Im blind lmaoo

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