Help with BindableEvent

I’m trying to create a “notification” that is fired from a local script to a local script. I’m using a BindableEvent to do this, and this is what it looks like: (in StarterGui)

Screenshot 2023-12-27 at 12.28.34 PM

And this is what the script has:

script.Parent.Send.Event:Connect(function (Text, Color)
	print("Notification")
	local Notification = script.Parent.Label:Clone()
	Notification.Text = Text
	game.TweenService:Create(Notification, TweenInfo.new(1, Enum.EasingStyle.Quint), {TextColor3 = Color, Position = UDim2.new(0.5, 0, 0.1, 10)}):Play()
	task.wait(#Text / 190 * 60)
	game.TweenService:Create(Notification, TweenInfo.new(.5, Enum.EasingStyle.Quart), {TextTransparency = 1, TextStrokeTransparency = 1}):Play()
	task.wait(.5)
	Notification:Destroy()
end)

When I fire the event from the other LocalScript, “Notification” prints, but nothing gets cloned in my PlayerGui and none of the rest outputs or does anything.

1 Like

The notification is not parented.

(Side note: instead of waiting for a tween duration, connect tween.Completed:Wait().)

2 Likes

What do you mean it’s not parented?

Just do Notification.Parent = Place you want it to go Parent is what it will be found in

It is cloned, exists in the memory, the tween plays, but it isn’t part of the data model. You should set it’s Parent property.

Oops, I thought by default it’s supposed to be set the same parent

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