#im worrying about my script continuing after an script-reset. plus the error detecter doesnt work

1 messages · Page 1 of 1 (latest)

onyx echo
#

after a reset

wind sapphire
#

In the future use Random.new()

#

Instead of math.random

crisp fern
#

im not reading 250 lines

wind sapphire
#
for i,v in game.Players:GetPlayers() do
i = nil
v.Character.Health = 0
    v.Team = game.Teams.Humans
    tick()
    v.Team = game.Teams.Humans
    tick()
    v.Team = game.Teams.Humans
    tick()
    v.Team = game.Teams.Humans
    tick()
    v.Team = game.Teams.Humans
    tick()
    v.Team = game.Teams.Humans
    tick()
    v.Team = game.Teams.Humans
    tick()

end
``` wtf is this
crisp fern
#

is this a script from 2015

wind sapphire
crisp fern
#

why are u storing maps in Lighting

onyx echo
crisp fern
#

ok

onyx echo
#

there is an script that detects if a player die

#

so it uh

#

turns it into a zombie team

#

so i covered into that thing just bc to cover it

wind sapphire
onyx echo
#

incase a player lags

crisp fern
#

guy applying bandages n shit to a script

onyx echo
#

bruh

crisp fern
#

which it wotn

onyx echo
wind sapphire
onyx echo
wind sapphire
#

So what exactly are you worried about?

onyx echo
#

so when i do

#

im worried that the script still runs

wind sapphire
onyx echo
#

which can cause an loophole

wind sapphire
#

First off, if you disable the script - it won't run anymore.

#

Which means it never turns on.

onyx echo
#

enabled of disabled?

#

or

wind sapphire
#

Also tick() is not a replacement for task.wait()

hushed pike
onyx echo
hushed pike
#

wdym enabled or disabled

#

if the script is enabled then it runs

#

if it is disabled it won’t

onyx echo
#

ok

onyx echo
crisp fern
# onyx echo ok

if u change the enabled property in the same script u wont halt it

#

it will still execute everything

onyx echo
crisp fern
#

and use return

hushed pike
#

return exits early if ur wondering

onyx echo
#

bur ok

#

plus

#

why the uh

#

error detector starts to stop functioning after the script resets

onyx echo
hushed pike
#

where you want the script to exit

onyx echo
hushed pike
#

and stop anything else from executing

onyx echo
hushed pike
#

i haven’t even seen ur script

onyx echo
#

the near end

hushed pike
#

what?

#

what are you asking

onyx echo
#

wdym what are you asking

#

this

hushed pike
#

??

onyx echo
#

basically i want to halt the script after an event like if -04738084 == idk then

#

or after an repeat

#

but my biggest nightmare is that

#

when the if are complete then

hushed pike
#

okay so make it a function and call the function and break whenever that condition is true

onyx echo
#

what happens to the repeat

#

????

#

can you explain that clear

hushed pike
#

idk how much clearer i can be

onyx echo
#

but what function

celest helmBOT
#

studio** You are now Level 12! **studio

onyx echo
#

i get that you want me to do an function but

#

what function if the if detects if the game divided 1 / 3

hushed pike
#

send the code

#

where exactly you want it to stop the rest of the script from executing

onyx echo
hushed pike
#

okay where?

onyx echo
#

only on the ifs and repeats.

#

]

#

ignore the first repeat

#

that dont count

hushed pike
#

just send exactly where

#

screenshot with indents

onyx echo
hushed pike
#

so make that a function

onyx echo
#

but how

#

its getting an number

hushed pike
#

do u know how to script?

onyx echo
#

for i,v in game.players:getplayeres() do

#

and bkah

#

if i idnt know how to script

hushed pike
#

wdym how bro

onyx echo
#

then why i sent u the script

#

explain

hushed pike
#

u clearly don’t

#

u make a function e.g using number of players as an argument

#

call the function when you want to check if number of players is less than 1 and return if it is true

onyx echo
#

how i am supposed to remember...

hushed pike
#

just stop lying

onyx echo
#

ok, whatever you say.

hushed pike
#

so you made that whole script

onyx echo
#

when someone doesnt agree in your opinion thats the only thing you say

onyx echo
hushed pike
#

and you don’t know how to create a function

#

?

#

while you make numerous functions and use modules in your scripts

onyx echo
hushed pike
#

why would a function not be able to use a number?

onyx echo
#

t

#

that is what i mean

#

meant

hushed pike
#

how would you attempt do this then

onyx echo
#

if?

hushed pike
#

the function to return if cond is true

onyx echo
#

ok but

#

how should i use the function

#

like when i end the doing the function is just do

#

siop(idk)

#

or something like that

#

like my brain isnt working in this type of situation

hushed pike
#

you call it

sullen fiber
#

You never want an unambiguous blob of code

onyx echo