#If everyone dies before the round ends the game breaks

1 messages · Page 1 of 1 (latest)

slender tiger
#

Everytime i try to fix it it breaks the rest of the script

violet sky
#

and when you say the game breaks - break how, are you getting any script errors?

slender tiger
#

it ends fine if theres one person left when the script activates

violet sky
#

wheres your round timer

slender tiger
violet sky
violet sky
slender tiger
solar glenBOT
#

studio** You are now Level 2! **studio

slender tiger
#

Because no one is in the round and it randomly gets someone in the round

#

whenever i try to edit it to make no one win if everyone dies it breaks the whole rest of the script

violet sky
# slender tiger

yea thought so, so if everyone dies then #self.Players is 0, and then when you try to pick a winner which you assume exists, even though it doesn't, local Winner = self.Players[math.random(1,#self.Players)], this is the part where you tell me what you think is going to happen when #self.Players is equal to 0 here?

slender tiger
violet sky
slender tiger
violet sky
#

and now you can't get someone else's code to do what you want? oh my scream color me surprised, who'd have seen that one coming? who'da thunk, who'da guessed that you copying code you don't understand would end up this way! agony

slender tiger
violet sky
#

in all seriousness you aint going to get anywhere just by stitching code, that is copy+pasting existing code and changing it slightly to try and get something that kind-of does what you want

#

vibe coding with ai is the same

slender tiger
violet sky
slender tiger
violet sky
#

its like if #self.Players < 1 then ... handle no players() ... else handlewinner() end literally an if statement very simple

slender tiger
#

...

#

i tried to make it so that if #self.Players = 0 then it = nil but it was already nil if it was 0

#

...

violet sky
violet sky
#

each solution being equally correct as the last

#

the point is you should expect to make mistakes and bad code.

#

and that's okay. it will be bad code, but make enough of it and eventually it won't be bad code anymore 👍

slender tiger
violet sky
#

i've seen that mistake made many, many times

#

make +1jump/sec or a button simulator for example

#

if you can't handle +1jump/sec, you aren't making anything else.

bleak pollen
#

@violet sky i seen you around and u look
experienced, have you made any games?

violet sky
#

have you made any games?

bleak pollen
#

Not yet

bleak pollen
bleak pollen
#

@violet sky Can i see one of ur games?

#

roblox

violet sky
#

i'd rather not advertise. why tho

bleak pollen
#

i want to see good games

#

@violet sky

#

Why wouldn't you want me to see

#

its just players trying other player's games

violet sky
#

i didn't say they were good

bleak pollen
#

Well

#

can i see?

#

@violet sky

violet sky
#

you are not my target audience neither is really anyone else here

bleak pollen
#

so

#

ur target audience isnt normal players

#

@violet sky ALRIGGHT