In a tool, I want to use the activate function to do something at the mouse's position when clicked. it is fairly easy to do inside of a local script, but I can't seem to do it with a regular script. I tried doing
script.Parent.Activated:connect(function(mouse)
Part = Instance.new("Part", workspace)
Part.Position = mouse.Hit.Position
end)
but the parameter of the function doesn't seem to be the actual mouse. Doing this with a local script is just
Mouse = game.Players.LocalPlayer:GetMouse()
and that's that, but I need it with a regular script because the script I want to run doesn't work with a local script.

9 comments
Didn't work mate. What I'm looking for is to only use a regular script, because doing what I want the script to actually do won't work with a local one. I tried using your regular script, and it didn't work. I tried using both at once and it didn't work. I'll try experimenting with your advice. Thanks in advance.
No, you need to do everything I've gone over in my solution, it doesn't work if you only pick and choose.
Put the regular script inside server script service and the local script inside your tool
Aw man! That tutorial I was watching was getting itneresting. I put the regular script into ServerScriptService and sure enough.. it didn't work! I fixed it though. Your local script had a slight error. Thanks mate. I'll see if the script I want to run will run now, and if it does I'll mark your answer.
You don't have to be snide about this, I didn't need to spend part of my day answering your question, I did this for your benefit. There is nothing wrong with my answer, and whether you decide to do it or not is up to you, but it solves your question, so mark it as the accepted answer.
ugh i have to do pairs and stuff hold up
@newton162 Dude, you can not put parts into Workspace via purely client script and make it show for all users now. It's part of Roblox's FilteringEnabled security which keeps products of a client reserved to the client. If you want a part to be placed in Workspace, then you'd have to use a client AND server script. Any tutorials dating pre-July of 2018 are going to be useless.
that was in the tutorial. Local being locally, as in all, right? Sorry im dumb
Local script means a script run entirely by the client, a regular script is a script run entirely by the server. You can't mix them without remote events or functions.