So I'm creating a spawn system for weapons, what it does is go through a table of spawns selects one then goes through a table of weapons and selects one. Prints me the variable for where it is supposed to spawn then clones the weapon from ReplicatedStorage to the SpawnPoint chosen
I have it working and spawning the weapons but I can't get the weapons position set to the spawn point.
This is my code as I have it:
spawnpoints = game.Workspace:FindFirstChild("Spawn Point")
sp1=spawnpoints.sp1
sp2=spawnpoints.sp2
sp3=spawnpoints.sp3
sp4=spawnpoints.sp4
sp5=spawnpoints.sp5
sp6=spawnpoints.sp6
pb=game.ReplicatedStorage.pb_gun
sword=game.ReplicatedStorage.sword
timebomb=game.ReplicatedStorage.timebomb
rocket=game.ReplicatedStorage.rocket
function spawn_weapon()
local debounce = false
local spawns={sp1,sp2,sp3,sp4,sp5,sp6}
local spawnpoint=spawns[math.random(1, #spawns)]
local spawnpos=spawnpoint.Position
print(spawnpoint)
local weapons={pb,sword,timebomb,rocket}
local weapon=weapons[math.random(1, #weapons)]
local weaponpos=weapon.Handle.Position
if debounce == false then
weapon:Clone()
weapon.Parent=spawnpoint
weaponpos=CFrame.new(spawnpos)
print ("Weapon Spawned")
debounce = true
wait(3)
debounce = false
end
end
while true do
wait(1)
spawn_weapon()
end
Everything here is working except the position and I'm getting no errors in output yet the weapon still spawns in the area I place it before I put it in replicatedstorage.

2 comments
This worked though I needed to make one teeny edit changing c.Position to c.Handle.Position because a tool has no 'position' variable.
Glad to hear you were able to debug with ease :D Happy developing mate.