#very simple script, but error
1 messages · Page 1 of 1 (latest)
Server:
local updateDayEvent = game.ReplicatedStorage:WaitForChild("UpdateDay")
while true do
wait(3)
currentDay = currentDay + 1
print(currentDay)
updateDayEvent:FireAllClients(currentDay)
end ```
Local:
local dayGui = game.Players.LocalPlayer.PlayerGui:WaitForChild("DayGui")
local updateDayEvent = game.ReplicatedStorage:WaitForChild("UpdateDay")
updateDayEvent.OnClientEvent:Connect(function(plr, day)
dayGui.Frame.Day.Text = tostring(day)
end) ```
no errors
just making the label "nil"
The onclientevent remove the plr in the argument. I suggest you look more into remote events
Create a Custom Enum
??