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

Problem with my intro gui script?

while true do
	script.Parent.BackgroundTransparency = 0
	script.Jeopardy:Play()
	script.Parent.Text = "Loading"
	script.Parent.Loading:TweenSize(UDim2.new(0.05, 0, 0, 0), "Back", 5)
	wait(5)
	script.Parent.Text = ""
	script.Jeopardy:Stop()
	wait(0.1)
	script.Parent.BackgroundTransparency = 0.1
	wait(0.2)
	script.Parent.BackgroundTransparency = 0.2
	wait(0.2)
	script.Parent.BackgroundTransparency = 0.3
	wait(0.2)
	script.Parent.BackgroundTransparency = 0.4
	wait(0.2)
	script.Parent.BackgroundTransparency = 0.5
	wait(0.2)
	script.Parent.BackgroundTransparency = 0.6
	wait(0.2)
	script.Parent.BackgroundTransparency = 0.7
	wait(0.2)
	script.Parent.BackgroundTransparency = 0.8
	wait(0.2)
	script.Parent.BackgroundTransparency = 0.9
	wait(0.2)
	script.Parent.BackgroundTransparency = 1
	wait(5)
end

Error: Unable to cast string to token

1 answer

✓ Accepted answer

You must be using a LocalScript to tween an object (If you are not), You also forgot your EasingDirection just after the endSize

Example:

while true do
	script.Parent.BackgroundTransparency = 0
	script.Jeopardy:Play()
	script.Parent.Text = "Loading"
	script.Parent.Loading:TweenSize(UDim2.new(0.05, 0, 0, 0), "Out","Back", 5)
	wait(5)
	script.Parent.Text = ""
	script.Jeopardy:Stop()
	wait(0.1)
	for i=0,1,.1 do
		script.Parent.BackgroundTransparency = i
		wait(0.2)
	end
	wait(5)
end

4 comments

0

Now, it seems the gui gets smaller and disappears. Why is this? I only want it to get larger going right, like a loading screen.

1

Change your endSize to UDim2.new(1,0,1,0)

0

Now the whole screen is full. :/

1

Change it to the exact size you want it to be 1,0,1,0 means X and Y are 100% 0 Offset

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