You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want a zone to shrink down around a radius -
What is the issue? Include screenshots / videos if possible!
My current equation isnt working -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
ive tried a couple things and just looking at it and once i see the solution ill know its the solution
this is apart of a larger system so ill try to break what i need down
repeat
local OX = math.random(NX,X)
local OZ = math.random(NZ,Z)
local RX = math.random(X/2,X)
local RZ = math.random(X/2,Z)
local X = script["XCordnate(Studs)"].Value
local Z = script["ZCordnate(Studs)"].Value
local NX = script["XCordnateNegative(Studs)"].Value
local NZ = script["ZCordnateNegative(Studs)"].Value
local ClosingTime = script.ClosingTime.Value
local TimeBetweenCircles = script["TimeBetweenCircles(NotIncludingClosingTime)"].Value
local Orgin = {OX,OZ}
Circles += 1
local Radius = ((30 - game.ServerStorage.PlayersAlive.Value) / (RX + RZ)) * 250 -- deleate the 5 when done with storm system
if Max <= Radius then
Max = Radius
end
local Bump = 100
local MoveVector = Vector3.new(Orgin[1]/Bump, game.Workspace.StormStats.StormBoarder.Position.Y, Orgin[2]/Bump)
local SizeVector = Vector3.new((Radius * 2) / Bump, game.Workspace.StormStats.StormBoarder.Size.Y, (Radius * 2) / Bump) -- THIS IS WHERE THE MATH IS so i need it to find how to get from its current size to the next smaller size, it needs to split up the big size over to a small amt (100 AKA bump)
local WaitTime = ClosingTime/Bump
for i = 1,Bump do
if Radius == Max then
game.Workspace.StormStats.StormBoarder.Size = Vector3.new(game.Workspace.StormStats.StormBoarder.Size.X - SizeVector.X, game.Workspace.StormStats.StormBoarder.Size.Y, game.Workspace.StormStats.StormBoarder.Size.Z - SizeVector.Z)
end
Max = Radius
game.Workspace.StormStats.StormBoarder.Position = Vector3.new(game.Workspace.StormStats.StormBoarder.Position.X + MoveVector.X, game.Workspace.StormStats.StormBoarder.Position.Y, game.Workspace.StormStats.StormBoarder.Position.Z + MoveVector.Z)
task.wait(WaitTime)
end
print(Radius)
print(Vector3.new(Radius * 2, game.Workspace.StormStats.StormBoarder.Size.Y, Radius * 2))
-- game.Workspace.StormStats.StormBoarder.Size = Vector3.new(Radius * 2, 500, Radius * 2) By the end it needs to be here
game.Workspace.StormStats.Radius.Value = Radius
game.Workspace.StormStats.OrginX.Value = OX
game.Workspace.StormStats.OrginZ.Value = OZ
wait(5000)
until game.Workspace.GameEnded.Value == true
Thanks For Any Help!!