For some reason this script just won’t bother access the following hierarchy to get to the Frame that I want to customise the text of within this remote event. I’m heavily confused why it just spits this error
This gui is in starterplayer and it’s copied to PlayerGui so why can’t I access it? Is it because it’s an OnClientEvent so something messes up or something else?
It errors on the 13th line btw.
-- Services
local replicatedStorage = game:GetService("ReplicatedStorage")
local playerService = game:GetService("Players")
local serverStorage = game:GetService("ServerStorage")
-- Variables
local getRemote = replicatedStorage.Remote_Events.Change_Coin_Gui
getRemote.OnClientEvent:Connect(function()
print("Got client request")
local getPlayerGui = playerService:FindFirstChild("PlayerGui")
local getFolder = getPlayerGui:FindFirstChild("Tix_Amount")
local getTixCounter = getFolder:FindFirstChild("Tix_Counter")
local getFrame = getTixCounter:FindFirstChild("Frame")
getFrame.TextBox.Text = "Hello :)"
end)