Though I’m not sure if this means anything, but after I tried testing this in a local script I again tested it in a Server Script in ServerScriptService and got this error. This error doesn’t show up whenever I set it to a Local Script so this error might just be due to it being a Server Script
Yes I have already set it back to a Local Script in StarterPlayerScripts,
Still nothing changes
This is my current script at the moment:
task.wait(2)
local players = game:GetService("Players")
local re = game:GetService("ReplicatedStorage")
local player = players.LocalPlayer
local plrUI = player.PlayerGui
local text = plrUI:WaitForChild("Dialogue").txt
repeat task.wait() until player.CharacterAdded:Wait()
local function OnClientEvent()
warn("Warn has printed")
text.Text = ("hi")
task.wait(1)
text.Text = ("who are you?")
task.wait(1)
text.Text = (" ")
end
task.spawn(OnClientEvent) ```
I think the culprit is the repeat task.wait() until player.CharacterAdded:Wait(), since everything before that seems to be running fine. Sorry for suggesting that, I thought it could’ve worked, but I guess not.
task.wait(2)
local re = game:GetService("ReplicatedStorage")
local player = game.Players.LocalPlayer
local plrUI = player.PlayerGui
local text = plrUI:WaitForChild("Dialogue").txt
local function OnClientEvent()
warn("Warn has printed")
text.Text = ("hi")
task.wait(1)
text.Text = ("who are you?")
task.wait(1)
text.Text = (" ")
end
task.spawn(OnClientEvent)