if CanPlace then
--print("Render Step should work")
local Go = RunService.RenderStepped:Connect(function()
local MouseRay = Mouse.UnitRay
local CastRay = Ray.new(MouseRay.Origin, MouseRay.Direction * 1000)
local IgnoreList = {ClonedObject, Character, ClonedObject.Boundary, Object.Boundary}
local Hit, Position = workspace:FindPartOnRayWithIgnoreList(CastRay, IgnoreList)
if Hit and (HumRoot.Position).Magnitude < MaxDist then
CanPlace = true
else
CanPlace = false
end
local Angles = CFrame.Angles(0, math.rad(Rot), 0)
local NewCFrame = CFrame.new(Position.X, Position.Y + 1.5, Position.Z)
--print(ClonedObject.PrimaryPart)
ClonedObject:SetPrimaryPartCFrame(NewCFrame * Angles)
if Hit and Hit.Name == "Plot" and Hit.Name ~= "Boundary" then
CanPlace = true
ReallyCanPlace = true
else
CanPlace = false
ReallyCanPlace = false
end
end)
Problem is
I have no idea how to fix this. Spent last 5 hours trying to fix the script up and nothing seems to work. Any ideas?