Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can i remote mouse.Position event because this is not working?

LocalScript

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local mousep = mouse.Hit
local event = script.Parent.MouseRemoteEvent

event:FireServer(mousep)

Script

script.Parent.MouseRemoteEvent.OnServerEvent:connect(function(plr, mousep)
	Instance.new("Part",mousep)
end)

1 answer

Local Script

local event = --Location of event

function leftClick(mouse)
	event:FireServer()
end
script.Parent.MouseButton1Click:connect(leftClick)

Script

local event = --Location of event

event.onServerEvent:Connect(function(player)
	--What you want to do goes here
end)
  1. I would suggest putting the event in 'ReplicatedStorage'
  2. put the local script in a button of some sort
  3. put the script in the workspace

4 comments

1

i don't want to remote leftclick, i want to remote mouse position....

1

Doesn't works for mouse position!

1

i know this script is easy, but i need a mouse position event

This discussion is preserved as it was. New answers, comments, and votes are closed.