hi my name is abed and i need help
- i want some help i have tool but the tool work only for computer
- i want make button like bedwars just one button for attack
- the system for the sword i use it free model i wall put the local script for the tool
--|| Services ||--
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local UserInputService = game:GetService("UserInputService")
--|| Modules ||--
local AnimationHandler = require(ReplicatedStorage.Modules.Shared.AnimationHandler)
--|| Remotes ||--
local ServerRemote = ReplicatedStorage.Remotes["SwordServer"]
--|| Variables ||--
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Tool = script.Parent
local Equipped = false
--|| Input ||--
Tool.Equipped:Connect(function()
Equipped = true
ServerRemote:FireServer("sdarkblade", "Equipped")
AnimationHandler.PlayAnim("swordequip")
UserInputService.InputBegan:Connect(function(Input,Typing)
if Typing == false and Input.UserInputType == Enum.UserInputType.MouseButton1 and Equipped then
ServerRemote:FireServer("sdarkblade", "Sword", "sdarkblade")
end
end)
UserInputService.InputBegan:Connect(function(Input,Typing)
if Typing == false and Input.UserInputType == Enum.UserInputType.llllllllllll and Equipped then
ServerRemote:FireServer("sdarkblade", "Block", script.Parent.Name)
end
end)
end)
Tool.Unequipped:Connect(function()
ServerRemote:FireServer("sdarkblade","UnEquipped")
Equipped = false
end)
and thx