Here's the Module Script;
local NotificationModule = {}
local NotificationLabel = game.StarterGui.NotificationGui.NotificationLabel
function NotificationModule.NewNotification(text, duration)
local Notification = NotificationLabel:Clone()
Notification.Text = text
Notification:TweenPosition(UDim2.new(0.829, 0,0.876, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Sine, .35)
wait(duration)
Notification:TweenPosition(UDim2.new(1, 0,0.876, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Sine, .35)
end
return NotificationModule
The module is supposed to display a GUI with the wanted text and duration.
I call the module which is parented in a script in workspace.
Here's the script that calls the module;
local NotificationModule = require(script.NotificationModule)
wait(5)
NotificationModule.NewNotification("Hello!", 6.5)
I have the wait so it doesn't fire the code when I join the game.
The script doesn't work and I don't know what to do. Thanks to anyone who helps!

1 comment
You didn't set NotificationLabel parent to player gui