How do I make a model (Gun) function like a tool by pressing a button in a Gui (If you want some exemple: Phantom forces you deploy you get your gun you can shoot with it and everyting put it's just a model)
I'm sorry if you have trouble to understand my post, because french is my main language
Connect the button event to a function which equips/dequips the model by placing it in your character and welding it. Then, you can use the UserInputService to detect mouse clicks and whatnot.
Here's a rough skeleton to get you started. Note that this won't work for filtering enabled games.
function equipTool() tool = toolModel:Clone() tool.Parent = character --Do some welding end function dequipTool() tool:Destroy() end button.MouseButton1Click:connect(function() if equipped then equipTool() else unequipTool() end end) game:GetService("UserInputService").InputBegan:Connect(function(input) if input.UserInputType == "MouseButton1" then --Fire the weapon end end)