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

what is wrong with this gui script?

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?

2 answers

Udim2.new should be UDim2.new (note the capital D).

3 comments

0

Ok, I'll try that

0

But is there anything else wrong with the script?

0

That's all I can see. If it's still not working, copy/paste the output here.

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

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