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

Remote Event Is Not Working In Server Script ?? [closed]

Asked by 4 years ago

This question already has an answer here:

Remote Event Is Not Working In Server Script ??

"i posted this twice first did not answer it" hi thank you for reading my post i have a small problem i send this remote event from the server to a local script inside the playerGui

remotecounter:FireAllClients()

the local script inside the player gui and

    remoteEvent.OnClientEvent:Connect(function()
        script.Parent.Parent.Enabled=true
        repeat
            wait(1)
            counternum.Value=counternum.Value-1
            script.Parent.Text=counternum.Value

        until  counternum.Value<=310

        remotemove:FireServer()

        --counternum.Value=360

    end)     

and again this local script sends so another serverscrpt when the timer is up

the other script

remotemove.OnServerEvent:Connect(function(plr)
        -- code when timer is up

end

but remotemove doesn't fire to the server and that is the error thanks for reading this post if you now the solution please answer. and if u have questions feel free to ask than

1
What do you want to happen when the timer is over? JesseSong 3916 — 4y
0
well that remoteeven to be fired to another server script jessesong you_success -50 — 4y
1
But what do you want the server to do JesseSong 3916 — 4y
0
then i know that the timer is up and i end the game and teleport them and others you_success -50 — 4y

Marked as Duplicate by youtubemasterWOW and JesseSong

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?

1 answer

Log in to vote
1
Answered by
JesseSong 3916 Moderation Voter Community Moderator
4 years ago
Edited 4 years ago

The error should be that you didn't reference the player that joined. Use FireClient




local Players = game:GetService("Players") local welcomePlayerEvent = Instance.new("RemoteEvent") welcomePlayerEvent.Parent = game.ReplicatedStorage welcomePlayerEvent.Name = "WelcomePlayerEvent" local function onPlayerAdded(player) welcomePlayerEvent:FireClient(player) end Players.PlayerAdded:Connect(onPlayerAdded)
0
thanks i already called it in my code but i just pastet it here local remoteEvent=game:GetService("ReplicatedStorage"):WaitForChild("CounterStart") local remotemove=game:GetService("ReplicatedStorage"):WaitForChild("RemoteMove") you_success -50 — 4y
1
Also what do you want to do when the timer is over? JesseSong 3916 — 4y
0
then i know that the timer is up and i end the game and teleport them and others you_success -50 — 4y
1
I edited JesseSong 3916 — 4y
Ad