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

why doesnt the marking brick move? [Solved]

Asked by 4 years ago
Edited 4 years ago

Edit:

I quickly realized that the client cant replicate vector3 values, therefore to the script nothing changed.

everything works fine except for line 13 because it doesnt move the brick that points the bullets to wherever the player marks the strike (resulting in it shooting off into 0,0,0, or atleast it tries to without gravity pulling it down)

there is no output of an error, warning or anything else in this script itself.. dont even ask about how much spam the bullets create if it doesnt hit a humanoid (not a srs problem tho)

heres the server script (nothing wrong with the local script that calls the event)

local Event = game.ReplicatedStorage.Event1

local function airstrike()

local assets = game.Lighting.Assets
local folder = Instance.new("Folder")
folder.Parent = workspace
folder.Name = "AirstrikeCache"

            local part = Instance.new("Part")
                part.Parent=folder
                part.Anchored=true
                part.Position=Vector3.new(script.Position.Value.X,script.Position.Value.Y,script.Position.Value.Z)
                part.Size=Vector3.new(10, 0.05, 10)

                wait(6)
                    for i = 1,100 do
                        local grenade=assets.AirstrikeBullet:Clone()
                        grenade.Parent=folder
                        grenade.bulletscript.Disabled=false
                        grenade.Anchored=false
                        grenade.CFrame = CFrame.new(grenade.Position, part.Position)
                        grenade.Orientation=Vector3.new((grenade.Orientation.X+math.random(-3,3)),(grenade.Orientation.Y+90+math.random(-3,3)),(grenade.Orientation.Z+math.random(-3,3)))
                    local gs=script.gunshot:Clone()
                    gs.PlaybackSpeed = math.random(0,1).."."..math.random(5,9)
                    gs.Parent=grenade
                    gs:Play()
                    wait(.0025)
                    end
            wait(3)
            folder:Destroy()
end

Event.OnServerEvent:Connect(airstrike)

shoutout to the people that helped me fix the rest of the script and how to call it through events (whos names i forgot cuz i deleted the questions from me feeling stupid..)

Answer this question