How would I get the circle to appear on the new brick?
The script is a local script inside of StarterPlayerScripts: > wait(1)
local Character = game.Players.LocalPlayer.Character
local part = script.CirclePart:Clone()
part.Parent = Character
local Range = (part.Range.Value * 2)
local RotationSpeed = 0.035
local Run_Service = game:GetService(“RunService”)
local groundYPosition = Character.HumanoidRootPart.Position.Y - 3
You need to use Raycasting. Here is a code example, it probably isn’t right but its something you could use as reference.
local Running
local RunService = game:GetService("RunService")
local Params = RaycastParams.new()
Params.FilterType = Enum.RaycastFilterType.Exclude
Running = RunService.RenderStepped:Connect(function()
local CastFrom = HumanoidRootPart.Position
local CastTo = CastFrom + Vector3.new(0,-0.1,0)
local Raycast = workspace:Raycast(CastFrom, (CastTo - CastFrom).Unit * 250, Params)
if Raycast then
Circle.Position = Raycast.Positon
end
end)