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?
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