I am trying to make a player advertisement system, and I am working on the UI
Here is my code:
local TxtBox = script.Parent.AssetIdTxtBox
local ConfirmButton = script.Parent.Confirm
local AssetId = nil
local function getId()
AssetId = TxtBox.Text
end
TxtBox.Text:GetPropertyChangedSignal('Value'):Connect(getId)
while wait(10) do
print(AssetId)
end
“PlayerGui.ScreenGui.Bg.LocalScript:13: attempt to call a nil value”
I believe you’re trying to call GetPropertyChangedSignal on Text, which is a property itself. Instead, call it on the textbox and replace Value with Text.