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

help with making own bullet to a gun?

Asked by 3 years ago

So what i have tried is getting a part in replicated storage and making it shoot out of my "gun" it have multiple scripts it works okay but i want the place it shoot it from a bit further away from the player but then it doesnt work anymore... idk if that is well explained and idk if its too much getting you to make the work if so i just close it

  1. local mouse=game.Players.LocalPlayer:GetMouse() local fire = script.Parent:WaitForChild('fire') local debounce = true
    mouse.Button1Down:connect(function(key) if debounce == true then debounce = false fire:FireServer() wait(3) debounce = true end end) 2.

local fire = script.Parent:WaitForChild('fire')

fire.OnServerEvent:Connect(function(player)

local clone = game.ReplicatedStorage.Bullet:Clone() --- the bullet that get cloned
clone.Parent = workspace
clone.Position = script.Parent.lol.Position
clone.Orientation = script.Parent.Handle.Orientation

wait(0.1)

end)

0
Please first properly indent your code. It is ready hard to understand like this Soban06 410 — 3y

Answer this question