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

Where Should I put the detection code ?? [closed]

Asked by 3 years ago
Edited 3 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.

hi thanks i have a small problem i made a rating system for everyplayer end when the game is over i the player can rate foreexaple map and the number of rates the map gets it gets into the map here is the detection code.

for i,surface in pairs(surfacess) do
            local winnerscore={}
            table.insert(winnerscore,surface.Score.Value)
            local numberscore=max(winnerscore)
            if numberscore==surface.Score.Value then
                print("result")
                print(surface)
                print(surface.Score.Value)

            end
            surface:Destroy()
end

bu where should i put it i have this code before the detection and this is fired for every player but i only want the detection code to be run once.

remotemove.OnServerEvent:Connect(function(plr)                      
    -- gets ratings and puts ut into the map
end

and when i put it after this code the detection will run first because its waiting for a fireevents

Closed as Not Constructive by User#23252 and jediplocoon

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?