Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can someone help me make this server sided and client sided?

Asked by 2 years ago

So basically I'm making a timer script and it seems to be working, but the problem is when I press play the timer doesn't go down. But when I go to the "current server" thing the timers going down and everything works, and when I got to "current client" it doesn't go down. Can someone help me? This is my code(its 2 scripts)

local Timer = game.StarterGui.ScreenGui.TextLabel
local TimerNumber = game.ServerStorage.Value
local TimerSwitch = game.ServerStorage.TimerSwitch
repeat
    wait(1.1)
    Timer.Text = TimerNumber.Value
until 
TimerSwitch == true
local Timer = game.StarterGui.ScreenGui.TextLabel
local TimerNumber = game.ServerStorage.Value
local function Timer1()
repeat
wait(1)
TimerNumber.Value -= 1
until
TimerNumber.Value <= 0
Timer.Visible = false
end

Timer1()

0
use a remoteevent, more specifically ,the :FireAllClients() command winmestndsfrwiltoliv 0 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago

Since you are using a script to change a value, the changes will only work on the server, so to fix this use a remote event to transmit the value instead of a value.

0
so I just put all my script inside the remote event? StevenElijah7019 57 — 2y
Ad

Answer this question