Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

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

Asked by
Kurcha 0
13 days 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
It is, but it goes over way too many things for me to even see what I'm supposed to do. Kurcha 0 — 13d

Answer this question