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

Can someone tell me whats wrong with this car bomb script?

Asked by 10 years ago

I am making a new game that has cars that are placed into lighting, then when a user clicks the pad he chooses which car he wants. I have the car spawning and driving working, but when I go to the bomb shop and put a bomb in my car and then activate the bomb, it makes the bomb blinking light and explosion near the place the car spawned. My goal is to get it to explode exactly where the player is sitting so he dies. Can someone take a look at the script and find out why it is placeing the explosion and blinking light where the car spawned? Here is the script:

01local currentBomb = "None"
02local radius = 25
03local multiplier = 3
04 
05script.Parent:WaitForChild("HasBomb")
06script.Parent:WaitForChild("BombArmed")
07script.Parent:WaitForChild("Essentials")
08script.Parent.Essentials:WaitForChild("BombLight")
09 
10script.Parent.HasBomb.Changed:connect(function()
11    if currentBomb == "None" then
12        currentBomb = script.Parent.HasBomb.Value
13        coroutine.resume(coroutine.create(function()
14            while currentBomb ~= "None" do
15                wait(2)
View all 81 lines...
0
Put your code within the block lua options. Not only does it make it easier for someone to answer your question as we dont have to download anything, But its also quicker than uploading something to another website to be downloaded. Uroxus 350 — 10y

1 answer

Log in to vote
1
Answered by 10 years ago

I am not even going to attempt to download this. Please use the lua code block and put your script in between the ~'s as it will make it look as an acctual script. I know it is hard to get used to, but please do it.

Ad

Answer this question