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)
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
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
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
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
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
try using WaitForChild() when you get the remote event local Remote = game.ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("Prompt") if that doesnt work tell me