im making a tower defense game and using tools for the placing mechanic, but the tools just, dont work, i have no idea how to fix this
local model = game.ReplicatedStorage.Towers.Gunner
local mouse = game.Players.LocalPlayer:GetMouse()
script.Parent.Equipped:Connect(function()
print("Equipped") -- wont print
local clone = model:Clone()
clone.Parent = workspace.Previews
for i,v in clone:GetDescendants() do
if v:IsA("BasePart") then
v.Transparency = 0.5
v.CanCollide = false
v.CanTouch = false
v.CanQuery = false
end
end
mouse.Move:Connect(function()
clone:MoveTo(mouse.Hit.Position)
end)
end)
script.Parent.Unequipped:Connect(function()
workspace.Previews:ClearAllChildren()
end)