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!
too wait 4 seconds then do a tween -
What is the issue? Include screenshots / videos if possible!
i call wait(4) and it hangs
Here is the code
local db = false
script.Parent.Touched:Connect(function(h)
if db then return end
if h.Parent:FindFirstChild('Humanoid') then
if h.Parent.Name == script.Parent.Parent.Immune.Value then return end
db = true
h.Parent.Humanoid:TakeDamage(30)
local sph = Instance.new('Part')
sph.Shape = Enum.PartType.Ball
sph.Position = script.Parent.Position
sph.Parent = workspace
sph.Size = Vector3.new(3,3,3)
sph.TopSurface = Enum.SurfaceType.Smooth
sph.Anchored = true
sph.CanCollide = false
sph.BottomSurface = Enum.SurfaceType.Smooth
sph.Material = Enum.Material.ForceField
sph.BrickColor = BrickColor.new('Really red')
local ntw = game:GetService('TweenService'):Create(sph, TweenInfo.new(3), {Size=Vector3.new(20,20,20)})
ntw:Play()
print('played')
print('damage time')
local f = script.Script:Clone()
f.Parent = sph
f.Disabled = false
print('done')
wait(4)
print('shrinking')
ntw = game:GetService('TweenService'):Create(sph, TweenInfo.new(6), {Size=Vector3.new(-1,-1,-1)})
ntw:Play()
print('done')
wait(4)
print('deleting')
sph:Destroy()
f:Destroy()
db = false
end
end)
Any help would be appreciated!