Reputation: 39
The part is supposed to move to the mouse's position and it worked almost fine but the thing is it moves towards my screen...
Local script:
local moveevent = script:WaitForChild("MoveEvent")
script.Parent.Parent.Equipped:Connect(function(mouse)
mouse.Move:Connect(function()
moveevent:FireServer(mouse.Hit.p)
end)
end)
Script:
local moveevent = script.Parent:WaitForChild("MoveEvent")
moveevent.OnServerEvent:Connect(function(plr, mousepos)
workspace:WaitForChild("Spawnpart").Position = mousepos
end)
Upvotes: 0
Views: 103