Sapper Tool Thingy

I’m using this turret deployment system free model from thienbao2109 as a basis for my sapper system. From what I understand, when you click, it clones a “turret” (or fortification in my case), parents it to workspace, then puts it in front of you. What I want to know is how I could make it switch what it clones and deploys.

I’ve tried duplicating the scripts with both of them cloning different fortifications, but one is disabled and the other is not. A script that I’ve added also inside of the tool disables one and enables the other, but that doesn’t seem to work. Help? If you need the code, I’ll make an edit


local canPlace = true
local cooldown = 0.5

function wait(TimeToWait)
	if TimeToWait ~= nil then
		local TotalTime = 0
		TotalTime = TotalTime + game:GetService("RunService").Heartbeat:wait()
		while TotalTime < TimeToWait do
			TotalTime = TotalTime + game:GetService("RunService").Heartbeat:wait()

	local character = player.Character
	if canPlace then
		canPlace = false
		-- Place turret
		local fRay =, character.HumanoidRootPart.CFrame:vectorToWorldSpace(, 0, -5)))
		local hit, position = game.Workspace:FindPartOnRay(fRay, character)
		local ray =,, -200, 0))
		local hit, pos = game.Workspace:FindPartOnRay(ray, character)
		local turret = game.ReplicatedStorage.TestBuild1:Clone()
		turret.Creator.Value = player
		turret:SetPrimaryPartCFrame( +, 0.4, 0)))
		turret.Parent = game.Workspace
		canPlace = true

i mean i would probably go ahead and add the script youre referring to into this post. also i would recommend trying to find out where the original script referenced the turret then change it.

I know how to change it, the problem is I don’t know how to make it switch between one building type and another. Like sandbags and ladders. An example would be like blood and iron