TextLabel cuts off at a certain point

Hey all! I’m trying to create a system similar to how Hyperant does Rise of Nations (his event ticker)

I’ve made something which functions similar but it cuts off at a point where it shouldn’t. Any solution? Project file:
TickerScript.rbxl (45,7 KB)
https://gyazo.com/75c1590caf748c7954efbcf72b937ff3
https://gyazo.com/924dd6d05e7cd46d57aacdd290e8fa7d

https://gyazo.com/b969315b1df250e9ab9b4f14b4a463c7

workspace.EventManager.Events.ChildAdded:Connect(function(c)
	local event = game.Players.LocalPlayer.PlayerGui.EventBar.Date.SampleEvent:Clone()
	event.Parent=game.Players.LocalPlayer.PlayerGui.EventBar
	event.Text=c.Value
	event.RichText=true
	event.Visible=true

	game.Debris:AddItem(event,25)

	for i=1,math.huge do task.wait()
		event.Position-=UDim2.new(0,2,0,0)
	end
end)
2 Likes

That happens because of the Debris setting I assume, the object is deleted before it can reach the other side. Have you tried using while event.Position.X.Offset > 0 do instead of your for loop, and only destroying the item after that while loop is done?

2 Likes

Nope I set debris to math.huge and even deleted it. Still doesn’t work

1 Like

Once again, have you tried replacing your for loop with a while loop, and removing the debris altogether? If that doesn’t work either, that’s when we should thoroughly troubleshoot. It could be one of the TextLabel properties doing this, or some other script (or a different piece of the current script).

1 Like

yep my first script for this was using a while loop.

1 Like

this is a shot in the dark but could it be some sort of value you have in the parent ui frame like clipdescendants? it may just stop rendering the ui however this could be a wrong guess.

1 Like

ClipDescendants must be enabled to simulate this effect. I’m just wondering why it clips earlier than it should near the end

1 Like

Try and add a smaller frame inside the main frame and set it to transparent. You can then put the text label there and it will cut off before the end of the main frame.

1 Like

yep that’s what I’m doing right now but the result ends up like the video above

1 Like

interesting, i’ll see if i can replicate your issue when i get home, i’ve tinkered with a lot of moving texts in my time making random sporting stadiums with moving text but i’ve never encountered this o_0

1 Like

I sent the rbxl file if you need that.

1 Like

ye, i’m on school wifi atm and launching roblox studios is just not possible atm :sob:

1 Like

Bumping thread for visibility.

Solution: Nobody is on my level. The issue with being an absolute genius is that there is no one that can help you when you’re stuck. Good thing is; it pushes you to become smarter. That is what separates me and the rest of you plebeians.

Now, the solution is to resize the text.

event.Size = UDim2.new(0, event.TextBounds.X + 75, 1, 0);
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.