You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve?
Simply trying to get the billboard gui to increase +1 every second, essentially a stopwatch. -
What is the issue?
Basically, when I do the billboard clientsided (script is below), the script works just fine but obviously only I the player can see when my billboard changes but I can’t see the other player’s billboards change.
Originial Script
local PlayerVals = script.Parent.Parent:WaitForChild("PlayerVals")
local Seconds = PlayerVals:WaitForChild("Seconds")
local RenderService = game:GetService("RunService")
script.Parent.TextLabel.Text = Seconds.Value
local TextLabel = script.Parent.TextLabel
local RS = game:GetService("ReplicatedStorage")
local Timer = RS:WaitForChild("Timer")
while wait(1) do
Seconds.Value = Seconds.Value + 1
TextLabel.Text = Seconds.Value
end
However, when I attempted to make it server sided it just didn’t work.
When I tried to make the script server sided it just stopped wokring, here it is below
Full Scripts
Server Script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Timer = ReplicatedStorage:WaitForChild("Timer")
Timer.OnServerEvent:Connect(function(player, Seconds)
local Timer = player:WaitForChild("Timer")
local TextLabel = Timer:WaitForChild("TextLabel")
Seconds.Value = Seconds.Value + 1
TextLabel.Text = Seconds.Value
end)
Local Script
local PlayerVals = script.Parent.Parent:WaitForChild("PlayerVals")
local Seconds = PlayerVals:WaitForChild("Seconds")
script.Parent.TextLabel.Text = Seconds.Value
local TextLabel = script.Parent.TextLabel
local RS = game:GetService("ReplicatedStorage")
local Timer = RS:WaitForChild("Timer")
while wait(1) do
Timer:FireServer(Seconds)
end
I’m quite new to scripting and stll don’t fully understand how server events work, any help would be appreciated.