So basically 3rd question I solved the other two by the way. So now I have gotten the position of the mouse and the x and y But since I just want the block to spawn in the direction of the mouse spawning from the torso how do I do this? when I test it. It says it expects vector3 but I only have 2 coordinates and as such I want to use Vector2 Heres the script: (Sorry I dont know how to use the code blocks :sad_face:) local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local createPartEvent = ReplicatedStorage:FindFirstChild("Spells")
local cooldown = "on"
local mouse = ReplicatedStorage:FindFirstChild("Mouse")
local function Recieved(player, mouse)
if cooldown ~= "off" then
local torso = player.Character:WaitForChild("HumanoidRootPart")
local Part = Instance.new("Part")
Part.Parent = torso
Part.CFrame= torso.CFrame + Vector2.new(mouse) ---This is from the remote event and has the code mouse.X and mouse.Y
cooldown = "off"
wait(10)
cooldown = "on"
wait(10)
Part:Destroy()
end
end
mouse.OnServerEvent:Connect(Recieved)
