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

Random Brick Visiblity script?

Asked by
BryanFehr 133
5 years ago

Hello all! I am making a Battle Royale type game, and I've recently come across the 'storm' section! Now, creating a storm is too advanced in coding for me, but I've devised a way that'll eliminate that, yet I have no idea how to code it. So, my plans were to create a script where there's specific bricks(Because my map is made into squares, ie, every map piece is on its own square), I was wondering if it was possible to make a script that would chose a random brick after a certain period of time, that brick not kill, but the other bricks turn their kill value to true after that time has came up! As well, change the colour of that brick that isn't killing, so players know which one to go to! I haven't started coding this yet, because I do NOT know where to even begin! Any and all help is appreciated! Thanks again!

0
You can use the Random type to generate a random number to index tables of part for example. gullet 471 — 5y
0
How would I turn that into code? BryanFehr 133 — 5y
0
What I would do is actually what you don't want to do, and that would be to actually make a script for the storm itself. Psudar 882 — 5y

1 answer

Log in to vote
0
Answered by
Psudar 882 Moderation Voter
5 years ago
Edited 5 years ago

What I would do is actually what you don't want to do, and that would be to actually make a script for the storm itself. When you're learning programming, you should tackle things head on. Don't be afraid to delve into unknown territory. It's how you learn.

Anyway, here's how I would try and tackle this idea and maybe you could take something from it.

Keep in mind that these forums are more for specific questions, so I can't give you a specific answer. I can only give you advice on what I'd do. You should come back after considering my advice below with more specific questions to the functionalities of your scripts here:

  1. Make a model/part for the storm sphere.
  2. Make a script that chooses a random location on the map for said sphere.
  3. Use TweenService to have the storm/circle getting smaller and smaller. In short, TweenService allows you to animate CFrame changes and Size changes without actually finding every in between variable. By that I mean, finding every single size and position from point A to point B. It basically does all the work for you, look into it if you don't know how to use it.
  4. After I've done that, I'd write a script for doing damage to a player overtime after they've touched the storm part. You weren't very specific, but that's how I would tackle it. You can achieve this with a lot of methods, but I'd recommend some kind of loop to do damage over time, and that loop breaking once the player has stepped in or out of the ring/storm.

As you begin scripting this kind of thing and really get to thinking about it, you're going to come across one obstacle after another. That's just the nature of scripting. I can already think of 3-4 steps I skipped, but that's the general idea you need to understand before getting started.

You sound like a beginner, so I'm gonna direct you on a pretty good route to learning how to use this stuff! :) Here are some helpful sources on the suggested methods above:

TweenService CFrame Loop Basics AlvinBlox TweenService Tutorial (this helped a lot xd)

Hopefully this can help you learn a bit!

Ad

Answer this question