Still have questions? Join our Discord server and get real time help.
0

# How do you make something placeable on the ground, avoiding the camera?

Kurcha 33
6 months ago

I'm making a Tower Defense game, and I'm trying to make a Tower place on the ground, and certain parts of it, but it wont work. Anyone able to help?

local plr  = game.Players.LocalPlayer
local mouse = plr:GetMouse()
enabled = false
function onClick()
if game.ReplicatedStorage.Stats.Cash.Value >= 170 and enabled == false then
enabled = true
game.ReplicatedStorage.Stats.Cash.Value = game.ReplicatedStorage.Stats.Cash.Value - 170
local tower = game.ReplicatedStorage.Towers.DartPart:Clone()
tower.Parent = workspace.Towers
while enabled do
wait()
mouse.TargetFilter = workspace.Land
tower.PrimaryPart = tower.Part
wait()
tower:SetPrimaryPartCFrame(mouse.Hit*CFrame.Angles(math.pi/2,0,0)*CFrame.new(0,-1,0))
end
end
end
script.Parent.MouseButton1Click:connect(onClick)


(i'm fully aware it needs to be FE converted, im doing that later)

0
theking48989987 2009 — 6mo
0
It is, but it goes over way too many things for me to even see what I'm supposed to do. Kurcha 33 — 6mo