Как сделать оружие в Roblox Studio

Аватар автора
Светлые истории
Damage script.Parent.FireServer.OnServerEvent:Connect(function(player, target) wait(0.3) target.Humanoid:TakeDamage(20) end) Server (local) local player = game.Players.LocalPlayer local mouse = player:GetMouse() script.Parent.Activated:Connect(function() local target = mouse.Target if target.Parent:FindFirstChild("Humanoid") then script.Parent.FireServer:FireServer(target.Parent) end end) Sound tool = script.Parent handle = tool:WaitForChild'Handle' sound = handle:WaitForChild'Sound' tool.Activated:connect(function() sound:Play() end) Anim hold local tool = script.Parent local anim = Instance.new("Animation") local track tool.Equipped:Connect(function() track = script.Parent.Parent.Humanoid:LoadAnimation(anim) track.Priority = Enum.AnimationPriority.Action track.Looped = true track:Play() end) tool.Unequipped:Connect(function() if track then track:Stop() end end)

0/0


0/0

0/0

0/0