function goLeft() script.Disabled = false wait(.5) script.Parent.Parent.Right.Visible = false for i = 1,56 do script.Parent.Parent.CustomClass1.Position = script.Parent.Parent.CustomClass1.Position - Udim2.new(-.25, 0, 0, 0) Script.Parent.Parent.CustomClass1.Visible = false script.Parent.Parent.CustomClass2.Visible = true script.Parent.Parent.CustomClass2.Position = Udim.new(15, 0, 1.5, 0) for i = 1, 48 do script.Parent.Parent.CustomClass2.Position = script.Parent.Parent.CustomClass1.Position - Udim2.new( -.25, 0, 0, 0) end script.Parent.Visible = false end script.Disabled = true end script.Parent.MouseButton1Down:connect(goLeft)
it says "Players.Player1.PlayerGui.ScreenGui.CustomClass.Left.Script:6: attempt to index global 'Udim2' (a nil value)" also for some reason it wont let me click it, i made the transparency 1 if that matters also, its a text button, all my other text buttons are clickable but not this one any idea why?
Udim2.new
should be UDim2.new
(note the capital D).
First, as MRFlimsy wrote, Udim2.new should be UDim2.new ; and in line 9 you wrote Udim.new, where it must be UDim2.new
Hope this helps,
mranderson11