Hey! I’m trying to make a boost circle for my simulator that, when standing inside it, you get 2x points for clicking.
I want the circle to spawn randomly for a bit within a radius I provide and then disappear and spawn in a different location in that radius later.
I achieved this for the most part, but for whatever reason I can’t get the thing to stay on the actual baseplate. This is what I have at this point:
while true do
local number = math.random(1,2)
if number == 1 then
end
if number == 2 then
local CloneBoostOne = BoostOne:Clone()
CloneBoostOne.Parent = workspace
CloneBoostOne.Name = "CBO"
local currentPiv = CloneBoostOne:GetPivot()
CloneBoostOne:PivotTo(currentPiv * CFrame.new(math.random(133,282), 0, math.random(-56.93,139.59)))
wait(30)
CloneBoostOne:Destroy()
end
wait(1)
end
The original BoostOne’s position is (0, -2.205, 0). Yet the clone pivots way higher like (x, 200+, z), and continuously rises slowly for some reason as shown in the video.
https://i.imgur.com/HvJPUSc.mp4
I’m sure this is just a simple mathematical error on my end with the relation between currentPiv and the CFrame.new when I tell it to pivot. But I don’t know how to fix it.
Does anyone know how to fix this? Or perhaps know of a better way to achieve what I’m going for?
Thanks!