i made a script where it spawns an object depending where the mouse is placed but when i added this damage script with together the spawn script, everything failed. When i spawn it in, it would work the first time the object spawn in but after a few seconds, the tween would loop again and it wouldn't return to the size before it was tween.
if you need to know any variables just ask.
Script:
UIS.InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.E and debounce then debounce = true clone.Parent = game.Workspace local mousePos = mouse.Hit.p clone.Position = mousePos local Tween = TS:Create(clone,TI,PP) Tween:Play() clone.Touched:Connect(function(h) if h.Parent:FindFirstChild("Humanoid") and h.Parent.Name ~= player.Name then print('hello') local enemyhumanoid = h.Parent.Humanoid enemyhumanoid:TakeDamage(15) clone.Size = Vector3.new(5,4,5) wait(1.5) clone.Parent = nil debounce = false end end) end end)