GUI Tweening Not Working

I’m attempting to use a module script to create a text popup thingy. Since it uses proximity prompts, I’ve had to use local scripts and normal scripts.

The tween however does not work or pop up, there are no errors.

I’ve tried using the built in GUI tweening and TweenService, I’ve tried not using it in the Module Script, but nothing works.

Module Script:

local NotifyConfig = {}
local NotifyGUI = game.StarterGui.NotificationGUI.TextLabel
local TweenService = game:GetService("TweenService")
local TweenInfo = TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.In) 
local Position = {Position = UDim2.new(0.221,0,0.858,0)}


function NotifyConfig.Notify(text)
	NotifyGUI.TextLabel.Text = text
	local Tween = TweenService:Create(NotifyGUI, TweenInfo, Position)
	Tween:Play()
end
return NotifyConfig

Script

local Remote = game.ReplicatedStorage.Remotes.Prompt
local ProximityPrompt = script.Parent.ProximityPrompt

	ProximityPrompt.Triggered:Connect(function(player)
		Remote:FireClient(player)
		local ClonedTool = game.ReplicatedStorage.Taco:Clone()
		ClonedTool.Parent = player.Backpack
	end)

LocalScript

local Remote = game.ReplicatedStorage.Remotes.Prompt
local NotifyConfig = require(game.ReplicatedStorage.NotifyConfig)

	Remote.OnClientEvent:Connect(function()
		NotifyConfig.Notify("Test test")
	end)

Any help would be appreciated, thanks!

1 Like

You spelled OnClientEvent wrong.

1 Like

While I did catch and fix this, the original problem still stands.

You’re supposed to access playergui not startergui

Still not a solution

local NotifyConfig = {}
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local NotifyGUI = player.PlayerGui.NotificationGUI.TextLabel
local TweenService = game:GetService("TweenService")
local TweenInfo = TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.In) 
local Position = {Position = UDim2.new(0.221,0,0.858,0)}


function NotifyConfig.Notify(text)
	NotifyGUI.TextLabel.Text = text
	local Tween = TweenService:Create(NotifyGUI, TweenInfo, Position)
	Tween:Play()
end
return NotifyConfig

any warnings or error in the output? try printing inside of Notify function to see if its actually being called

No warnings or errors, but it is not printing

You’re getting the variable reference of the NotifyGUI from the game’s StarterGui, the problem should be alleviated by changing it to game.Players.LocalPlayer:WaitForChild("PlayerGui").NotificationGUI.TextLabel since you said they werent any errors

I’ve updated and tested yet still no luck

local NotifyConfig = {}
local NotifyGUI = game.Players.LocalPlayer:WaitForChild("PlayerGui").NotificationGUI.TextLabel
local TweenService = game:GetService("TweenService")
local TweenInfo = TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.In) 
local Position = {Position = UDim2.new(0.221,0,0.858,0)}


function NotifyConfig.Notify(text)
	NotifyGUI.TextLabel.Text = text
	local Tween = TweenService:Create(NotifyGUI, TweenInfo, Position)
	Tween:Play()
	print("Tween completed")
end
return NotifyConfig

try changing the name of “TweenInfo” to “tweenInfo” (remove uppercase) i mean local tweenInfo = TweenInfo.new etc

Still no, I’m pretty stumped here

local NotifyConfig = {}
local NotifyGUI = game.Players.LocalPlayer:WaitForChild("PlayerGui").NotificationGUI.TextLabel
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.In) 
local Position = {Position = UDim2.new(0.221,0,0.858,0)}


function NotifyConfig.Notify(text)
	NotifyGUI.TextLabel.Text = text
	local Tween = TweenService:Create(NotifyGUI, tweenInfo, Position)
	Tween:Play()
	print("Tween completed")
end
return NotifyConfig

your’re doing

and you’re doing here

are you trying to access another textlabel or that was a mistake? (not related to the issue i think but just pointing out)

Just a mistake, fixing it does not fix the overall problem.

try this (cuz i tried and it works for me):

local NotifyConfig = {}
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local PlayerGui = player:WaitForChild("PlayerGui")
local NotifyGUI = PlayerGui:WaitForChild("NotificationGUI"):WaitForChild("TextLabel")
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.In) 
local position = {Position = UDim2.new(0.221,0,0.858,0)}

function NotifyConfig.Notify(text)
	NotifyGUI.Text = text
	local Tween = TweenService:Create(NotifyGUI, tweenInfo, position)
	Tween:Play()
end

return NotifyConfig

I really have no clue, the GUI is still not tweening and the print(“Tween completed”) still not printing.

try printing here, and see what happens when you trigger the proxprompt

Not printing at all, I really don’t know

local Remote = game.ReplicatedStorage.Remotes.Prompt
local NotifyConfig = require(game.ReplicatedStorage.NotifyConfig)

	Remote.OnClientEvent:Connect(function()
		print("Test 1")
		NotifyConfig.Notify("Test test")
		print("Test 2")
	end)

try using WaitForChild() when you get the remote event local Remote = game.ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("Prompt") if that doesnt work tell me

Does not work, still no warnings or errors, nothing is printing either.

you sure you placed the local script in playergui, or startercharacterscripts/starterplayerscripts?