"local function updateGhostChargePosition()
if ghostCharge then
local mouse = player:GetMouse()
if mouse.Target then
local mouseHit = mouse.Hit.Position
local mouseTarget = mouse.Target
local distance = (mouseHit - player.Character.HumanoidRootPart.Position).Magnitude
local isPlaceable = distance <= 7.5
local TofarPlaceable = distance >= 20
ghostCharge.CFrame = CFrame.new(mouseHit + Vector3.new(0, 0.25, 0))
--Here the question
ghostCharge.Highlight.OutlineColor = isPlaceable and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
if isPlaceable then
ghostCharge.Transparency = 0
elseif TofarPlaceable then
ghostCharge.Transparency = 1
end
else
local mouseHit = mouse.Hit.Position
local distance = (mouseHit - player.Character.HumanoidRootPart.Position).Magnitude
local isPlaceable = distance <= 10
ghostCharge.CFrame = CFrame.new(mouseHit + Vector3.new(0, 0.25, 0))
ghostCharge.Highlight.OutlineColor = isPlaceable and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
ghostCharge.Orientation = Vector3.new(0,0,0)
end
end
end"