Like this should work, right? It finds any parts that are already anchored, prints them out, and then anchors parts that weren't already. But it doesn't even detect any parts that aren't anchored, it doesn't even print out their names!
--Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")
--Consts/Vars
local tool = script.Parent
local onCooldown = false
local maxTime = 15
local cooldownTime = tool:WaitForChild("CooldownTime")
local part = ReplicatedStorage.Inverted_Sphere
--Tweens
local sizingTweenInfo = TweenInfo.new(
1, --Time
Enum.EasingStyle.Circular, --Easing Style
Enum.EasingDirection.In, --Easing Direction
0, --Repeat Count
false, --Will reverse?
0 --Delay
)
local reflectTweenInfo = TweenInfo.new(
1, --Time
Enum.EasingStyle.Back, --Easing Style
Enum.EasingDirection.InOut, --Easing Direction
0, --Repeat Count
true, --Will reverse?
0 --Delay
)
tool.Activated:Connect(function()
if not onCooldown then
print(tool.Name, "was activated")
local clone = part:Clone()
clone.Parent = workspace
clone.Position = tool.Handle.Position
local sizingTween = TweenService:Create(clone, sizingTweenInfo, {Size = Vector3.new(100,100,100)})
local reflectTween = TweenService:Create(clone, reflectTweenInfo, {Transparency = 5})
sizingTween:Play()
reflectTween:Play()