Script doesn't work please help

jumpscare disappears instantly instead of changing ImageTransparency 0 → 0.05 → 0.1… 1

Sound = script.Parent.Scream
Popup = script.Parent.Popup
im = Popup.BackGround.r
Ready = true
function onTouch(hit)
	local h = hit.Parent:FindFirstChild("Humanoid")
	if h ~= nil and Ready == true then
		Ready = false
		local plyr = game.Players:FindFirstChild(h.Parent.Name)
		local c = Popup:clone()
		c.Parent = plyr.PlayerGui
		script.Parent.Scream:play()
		game:GetService("TweenService"):Create(im, TweenInfo.new(0.8, Enum.EasingStyle.Quad), {ImageTransparency = 0}):Play()
		task.wait(0.8)
		c:remove()
		wait(1)
		Ready = true
	end
end
script.Parent.Touched:Connect(onTouch)

Your not tweening the clone, only the original instance.
Do this:

local Sound = script.Parent.Scream
local Popup = script.Parent.Popup
local Ready = true

function onTouch(hit)
   local h = hit.Parent:FindFirstChild("Humanoid")
   if h ~= nil and Ready == true then
      Ready = false
      local plyr = game.Players:FindFirstChild(h.Parent.Name)
      local c = Popup:Clone()
      c.Parent = plyr.PlayerGui
      script.Parent.Scream:play()
      game:GetService("TweenService"):Create(c.BackGround.r, TweenInfo.new(0.8, Enum.EasingStyle.Quad), {ImageTransparency = 0}):Play()
      task.wait(0.8)
      c:Remove()
      task.wait(1)
      Ready = true
   end
end

script.Parent.Touched:Connect(onTouch)
1 Like

Thank you so much it works!!! good script