I made a timestop script, but its dosent work with no error
TSCircle.Touched:Connect(function(hitpart)
if hitpart.Parent:FindFirstChildWhichIsA("Humanoid") and not hitpart:IsDescendantOf(char) then
local enemy = hitpart.Parent
local enemys = Players:GetPlayerFromCharacter(enemy)
if enemy:FindFirstChild("GetDamaged").Value == false then
if enemys then
local TSScript = ServerStorage.Items.ScreenEffects.TSEffect:Clone()
if enemys.Backpack:FindFirstChild(TSScript.Name) then
TSScript.Parent = enemys.Backpack
end
end
repeat
wait(0.1)
for i, v in pairs(enemy:GetDescendants()) do
if v:IsA("BasePart") then
v.Anchored = true
end
end
enemy:FindFirstChild("UsingMove").Value = true
until not game.Workspace:FindFirstChild(char.Name.. "Timestop")
if enemys then
local TSEndScript = ServerStorage.Items.ScreenEffects.TSEnd:Clone()
if enemys.Backpack:FindFirstChild(TSEndScript.Name) then
TSEndScript.Parent = enemys.Backpack
end
end
for i, v in pairs(enemy:GetDescendants()) do
if v:IsA("BasePart") then
v.Anchored = false
end
end
enemy:FindFirstChild("UsingMove").Value = false
end
else
if not hitpart:IsDescendantOf(char) and hitpart:IsA("BasePart") then
if not hitpart:IsDescendantOf(game.Workspace.Map) then
if not hitpart.Parent.Name == "Handssssss" or not hitpart.Parent.Name == "HeavyVFX" or not hitpart.Name == "Sign" then
repeat
wait()
hitpart.Anchored = true
until not game.Workspace:FindFirstChild(char.Name.. "Timestop")
hitpart.Anchored = false
end
end
end
end
end)