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)
