Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

can Spawnpoint be mouse position?

Asked by 3 years ago
local spawnpoint = script.Parent.TargetPart 
local cooldown = false

script.Parent.Activated:Connect(function()
if cooldown == false then
    cooldown = true

    local clone = game.ServerStorage.SpawnedItems.Ninja:Clone()
        local cf = spawnpoint.CFrame
        clone:SetPrimaryPartCFrame(cf)
    clone.Parent = game.Workspace
    wait(80)
    cooldown = false
end
end)

instead of targetpart in line 1 can it be my mouse position or can i code so the targetpart follows my mouse i heard that with mouse pos you can do it but i havent tried something like that before so im pretty new to this

Answer this question