Connect with knowledgeable individuals and find the best answers at IDNLearn.com. Join our interactive Q&A community and access a wealth of reliable answers to your most pressing questions.

local Damage = function(Part)
local A = Part
local B = Part.Position
local C = {
origin = Player.Character.Head.Position,
position = Part.Position,
velocity = Player.Character.Head.CFrame.lookVector * math.clamp(500, 100, 500),
acceleration = Vector3.new(0, -156.2, 0),
age = os.time(),
toolFrom = "Magnetite Crossbow",
object = game:GetService("ReplicatedStorage").Projectiles:findFirstChild("Bolt")
}
local D = (Player.Character.Head.Position - Part.Position).magnitude
game:GetService("ReplicatedStorage").Events.ProjectileImpact:FireServer(A, B, C, D)
end

Mouse.KeyUp:connect(function(key)
if key == "e" then
for i = 1, 20 do
if Mouse.Target and Mouse.Target.ClassName ~= "Terrain" then
Damage(Mouse.Target)
end
end
end
end)


Sagot :

Thank you for being part of this discussion. Keep exploring, asking questions, and sharing your insights with the community. Together, we can find the best solutions. IDNLearn.com has the answers you need. Thank you for visiting, and we look forward to helping you again soon.