It uses ViewportFrames for cutscenes
You did not provide any code, however, here’s how I’d do it:
local Connection
local Part = script.Parent
Connection = Part.Touched:Connect(function(Hit)
local Humanoid = Hit.Parent:FindFirstChild('Humanoid')
if Humanoid then
Humanoid:TakeDamage(100)
Connection:Disconnect() -- if we don't need it anymore, we disconnect it.
end
end)
What do you mean. did not provide? The code is
local debounce = false
function getPlayer(humanoid)
local players = game.Players:children()
for i = 1, #players do
if players[i].Character.Humanoid == humanoid then return players[i] end
end
return nil
end
function onTouch(part)
local human = part.Parent:findFirstChild(“Humanoid”)
if (human ~= nil) and debounce == false then
debounce = true
local player = getPlayer(human)
if (player == nil) then return end
player.PlayerGui.Speech.Enabled = true
script.Parent.Parent.Parent.Humanoid.WalkSpeed = "0"
script.LocalScript:Clone().Parent = player.PlayerGui.Speech.Frame
wait(10)
player.PlayerGui.DeathGuiT.Enabled = true
wait(2)
for i = 1,10 do
wait(.1)
player.PlayerGui.DeathGuiT.Transform.ImageTransparency = player.PlayerGui.DeathGuiT.Transform.ImageTransparency +.1
player.PlayerGui.DeathGuiT.TransformII.ImageTransparency = player.PlayerGui.DeathGuiT.TransformII.ImageTransparency -.1
end
wait(1)
for i = 1,10 do
wait(.1)
player.PlayerGui.DeathGuiT.TransformII.ImageTransparency = player.PlayerGui.DeathGuiT.TransformII.ImageTransparency +.1
player.PlayerGui.DeathGuiT.TransformIII.ImageTransparency = player.PlayerGui.DeathGuiT.TransformIII.ImageTransparency -.1
end
player.PlayerGui.Speech.Frame.Hello.TextLabel.Text = "Darkervoids"
wait(5)
end
end
script.Parent.Parent.Touched:Connect(onTouch)
nvm, the script actually works, only in game