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

Cannon ball not changing firing position? [FIXED]

Asked by 7 years ago
Edited 7 years ago
01c = script.Parent.click
02debounce = true
03 
04 
05pp = script.Parent.Barrel.Position
06 
07 
08script.Parent.click.ClickDetector.MouseClick:connect(function()
09    if debounce == true then c.BrickColor = BrickColor.new("Really red")
10        debounce = false
11 
12        b = Instance.new("Part", game.Workspace)
13        f = Instance.new("BodyThrust", b)
14        fire = Instance.new("Fire", b)
15        b.Name = "Canon Ball"
View all 39 lines...

It fires where the cannon was when the game first loaded and not where the cannon is at the moment. I tried to use a while true do loop for the position but it didnt run because it was doing the loop. - Thanks

1 answer

Log in to vote
0
Answered by 7 years ago

Sorry guys im stupid I found out that the variable was declared outside the function and put pp in the function. Ill hesitate before posting here in the future.

0
If you could edit your question so it says [Fixed] so that others know you don't need help. Greatly appreciated. Troidit 253 — 7y
0
Done birdeater11 14 — 7y
Ad

Answer this question