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

How do I make a tweened text that goes out the frame and disappears?

--|| VARIABLES ||--
local label1 = script.Parent.Frame.label1
local label2 = script.Parent.Frame.label2
local using = label1

--|| DIALOGUE ||--
local say = {"4","3","2","1"}

--|| TWEENING ||--
local function move(obj, pos)
	obj:TweenPosition(pos, "Out", "Quad", 2)
end

--|| SCRIPT ||--
for s = 1, #say do
	--|| POSITIONING, TEXT CHANGE, MOVING ||--
	using.Position = UDim2.new(-1, 0, 0, 0)
	using.Text = say[s]
	move(using, UDim2.new(0, 0, 0, 0))
	--|| PREPERATION FOR THE NEXT LABEL ||--
	if using == label1 then
		using = label2
	else
		using = label1
	end
	--|| MOVING LAST TEXT OFF ||--
	move(using, UDim2.new(1, 0, 0, 0))
	wait(3)
end

Is there a way to make it similar to the text in Survivor? I don't know how to explain the way it goes but when it goes out of the frame, instead of staying on the screen, it disappears (not immediately, but a part of it gets hidden until the whole text is outside the frame) I got this script from a Youtube video (and edited it) which uses a surface gui, but not a screen gui.

2 comments

0
0

Just a little tip do obj:TweenPosition(pos, "Out", "Quad", 2,true) makes the tween go alot faster and smoother

1 answer

✓ Accepted answer

Simply set the "ClipDescendants" property of the frame to true! Considering that the text label is part of the frame, the ClipDescendants Property will crop out the proportion of the texts label / frame that is outside of the parent frame!

3 comments

0

I'll try this, thank you!

0

It works, thank you so much and merry christmas!

0

Merry Christmas, happy holidays! :)

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