how do i GET MOUSE from a local script if i am using a remote event i been trying
local mouse = game.Players.LocalPlayer:GetMouse() local on = true local size = .1 local ammo = 6 script.Parent.Activated:Connect(function() script.Parent.make:FireServer() end) script.Parent.Deactivated:Connect(function() script.Parent.fire:FireServer() end)
Hi. I wouldn't fire the mouse itself, I would fire a mouse Property, example: "mouse.hit"
Local:
local mouse = game.Players.LocalPlayer:GetMouse() local on = true local size = .1 local ammo = 6 script.Parent.Activated:Connect(function() script.Parent.make:FireServer(mouse.Target) -- or any other mouse property you'd like to use such as hit, etc. end) script.Parent.Deactivated:Connect(function() script.Parent.fire:FireServer() end)
Server:
eventname.OnServerEvent:Connect(function(plr, mousetarget) --[[ remoteevents pass the player as the first parameter, and the second, and third, and in that order, respectively to the ones you defined on the localscript.]]-- --your code here <3 end)