Ok so basically, my brother deleted my saves for studio and I lost everything. I've been trying to recreate everything but what is practically the exact script isn't working. Or at least what I remember and my current knowledge.

Local Script

local gunTool = game.Players.LocalPlayer.Backpack:WaitForChild('gunTool')
gunTool.Activated:Connect(function(shot)
print("debug")
if shot then
    game:GetService("ReplicatedStorage").GunShoot:FireServer()
    end
end)

Script

game.ReplicatedStorage.GunShoot.OnServerEvent:Connect(function(p)
local bullet = game:GetService("ReplicatedStorage").Bullet:Clone()
    bullet.CFrame = p.Character.gunTool.muzzle.CFrame
    bullet.Parent = workspace
    bullet.Velocity = bullet.CFrame.lookVector * 600
end)

2 comments

0

where is the script located?

0

Go back to a past version?