I'm trying to figure out how to spawn parts at the cursors location but I can't seem to figure it out
I'm using it for this script (for my meteor staff).
I need it to spawn 400 studs above the cursors location.
(this is in a server script inside of a tool btw)
function ability1()
local heat = script.Parent.Heat
local smoke1 = script.Parent.Smoke1
local smoke2 = script.Parent.Smoke2
local wave = script.Parent.Wave
local aoedamage = script.Parent.aoedamage
local rock1 = Instance.new("Part")
local debounce = false
rock1.Transparency = 1
rock1.Size = Vector3.new(0,0,0)
rock1.Parent = workspace
rock1.Position = Vector3.new(0,320,0)
local heatClone = heat:Clone()
local smoke1Clone = smoke1:Clone()
local smoke2Clone = smoke2:Clone()
local waveClone = wave:Clone()
local aoedamageClone = aoedamage:Clone()
aoedamageClone.Parent = rock1
heatClone.Parent = rock1
smoke1Clone.Parent = rock1
smoke2Clone.Parent = rock1
waveClone.Parent = rock1
aoedamageClone.Disabled = false
heatClone.Enabled = true
smoke1Clone.Enabled = true
smoke2Clone.Enabled = true
waveClone.Enabled = true
end
local function onActivate()
ability1()
end
script.Parent.Activated:Connect(onActivate)

2 comments
use offsets
'use offsets' not detailed enough of an answer