This script is supposed to shoot 2 balls simultaneously out of the boss' eyes. No error occurs, and when I view the explorer, no parts spawn in the eyes. I put in a print() at the end, and it printed every time. Any ideas as to why this isn't working?
(For reference, Chosen.Value is a random person's name)
wait(2)
while wait(5) do
choice = 1 -- (choice is always 1 for testing purposes)
-- // ATTACKS \\
if choice == 1 then
for i = 1,50 do
wait(0.2)
local ball = Instance.new("Part", script.Parent.Eye)
ball.Position = script.Parent.Eye.Position
ball.Shape = "Ball"
ball.BrickColor = BrickColor.Red()
ball.Transparency = 0.5
ball.Material = "Neon"
ball.CanCollide = false
ball.Size = Vector3.new(3.79, 3.79, 3.79)
local RocketPropulsion = Instance.new("RocketPropulsion", ball)
RocketPropulsion.MaxThrust = math.huge
RocketPropulsion.MaxSpeed = 50
RocketPropulsion.Target = workspace[script.Parent.Chosen.Value].HumanoidRootPart
local ball2 = Instance.new("Part", script.Parent.Eye2)
ball2.Position = script.Parent.Eye2.Position
ball2.Shape = "Ball"
ball2.BrickColor = BrickColor.Red()
ball2.Transparency = 0.5
ball2.Material = "Neon"
ball.CanCollide = false
ball2.Size = Vector3.new(3.79, 3.79, 3.79)
local RocketPropulsion2 = Instance.new("RocketPropulsion", ball2)
RocketPropulsion2.MaxThrust = math.huge
RocketPropulsion2.MaxSpeed = 50
RocketPropulsion2.Target = workspace[script.Parent.Chosen.Value].HumanoidRootPart
RocketPropulsion:Fire()
RocketPropulsion2:Fire()
print('test')
end
end --
end --

1 comment
Id suggest starting with changing "neon" and "ball" to their Enum counterparts instead of Strings