So currently I'm trying to make it so whenever the size of the part is 2,2,2 it changes the text to "Meteor" however, it is not working. Please help!
if game.Workspace.Sizedparttest.Size == ("2,2,2") then game.Players.LocalPlayer.PlayerGui.size.Frame.Textlabel.Text = "Meteor" end
Size is a vector 3 and so you must create a vector 3 when you're trying to compare it. Also, you want to always use higher or equal since the size might not be exactly the size you're trying to compare it to. Finally, since you can't right out compare vector3 you want to add magnitude so you compare the length of the vector. Here's how you would do it:
local part = game.Workspace:FindFirstChild("Part") if part.Size.Magnitude >= Vector3.new(2,2,2).Magnitude then game.Players.LocalPlayer.PlayerGui.size.Frame.Textlabel.Text = "Meteor" end
Let me know how it goes!
This should work:
if game.Workspace.Sizedparttest.Size.X == 2 and game.Workspace.Sizedparttest.Size.Y== 2 and game.Workspace.Sizedparttest.Size.Z == 2 then game.Players.LocalPlayer.PlayerGui.size.Frame.Textlabel.Text = "Meteor" end