i have a script for my gun tool that fires certain particle emittors on click, but the tool does not seem to work for mobile users as somoene said it would require a special service called user input service. Would anyone be able to implement the service into my script so when the player taps and holds the gun fires and stops when the player removes the touch . heres my script
local Tool = script.Parent
local Handle = Tool.Handle
local Emitter = Handle.Attachment.Money
local Sound = Handle.Bubbles1Loop
Tool.Activated:Connect(function()
Sound.Playing = true
Emitter.Enabled = true
end)
Tool.Deactivated:Connect(function()
Sound.Playing = false
Emitter.Enabled = false
end)
Tool.Unequipped:Connect(function()
Sound.Playing = false
Emitter.Enabled = false
end)
function Activated()
end
function Equipped()
end
function Unequipped()
end
Tool.Activated:connect(Activated)
Tool.Equipped:connect(Equipped)
Tool.Unequipped:connect(Unequipped)
This/These tools also have a Handle, named Handle.
this isn’t compatible with mobile or console controls and only works with a keyboard, using ContextActionService:BindAction() with bindings for gamepad and create touch buttons makes it cross compatible