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

Bullet not Appearing when shooting gun. Help?

Asked by 5 years ago

a simple gun. i am welding a bullet to the barrel then destroying it, and it's not working! help?

--LOCAL SCRIPT


--common defenitions

local tool = script.Parent
local player = game:GetService("Players").LocalPlayer
local equipAnim = script.Parent:WaitForChild("Equip"):WaitForChild("Equiping")
local tool = script.Parent
--events
local Shooting = script.Parent:WaitForChild("Shoot")
local Reloading = script.Parent:WaitForChild("Reload")
--on activation

Shooting.OnServerEvent:Connect(function()
    local bullet = Instance.new("Part",game.Workspace)
    bullet.Transparency = 0
    bullet.CanCollide = false
    bullet.Material = "SmoothPlastic"
    bullet.BrickColor = BrickColor.new("Curry")
    bullet.Name = player.Name.."'s Bullet"
    local weld = Instance.new("Weld")
    weld.Part0 = script.Parent.Barrel
    weld.Part1 = bullet
    weld.Parent = script.Parent.Barrel
    bullet.Anchored = false
    wait(0.1)
bullet:Destroy()
end)
0
guys pls check out my question aswell pls look up for big chungus in questions it should show up RodrigatorOP 172 — 5y
0
is the OnServerEvent even running Gey4Jesus69 2705 — 5y
0
yes. its when the tool is activated. natonator63 29 — 5y

Answer this question