Im trying to make a gun flash however other players cant see it. How would I make this script work serverside so that other players can see it?
local Flash = script.Parent local UserInputService = game:GetService("UserInputService") local Tool = script.Parent local Player = game.Players.LocalPlayer UserInputService.InputBegan:Connect(function(InputObject) if InputObject.UserInputType == Enum.UserInputType.MouseButton1 then Flash.Enabled = true if Flash.Enabled == true then wait(0.01) Flash.Enabled = false end end end)
Write the input code into a local script inside of the gun. Then use a remote event inside of let's say the muzzle of the gun to contact the server and make the flash appear then disappear. Same script. Broke into two. Server script can be inside the gun to