i'm using a cutscene plugin by badlydev/beez_up and theres an option to 'play cutscene once when a part is touched' but it just puts the script into replicatedfirst so i'm not sure how to get it to play when a part is touched?
local data = {{CFrame = CFrame.new(-163.386337, 9.12168503, 86.5627747, -0.190807536, -0.0414887182, 0.980750322, -0, 0.999106526, 0.0422652364, -0.981627524, 0.0080645252, -0.190637022);Seconds = 1.5;Style = Enum.EasingStyle.Sine},{CFrame = CFrame.new(-170.23143, 9.03917599, 87.2517471, -0.0453640521, -0.000388695713, 0.998970389, -0, 0.999999881, 0.000389096298, -0.998970509, 1.76509839e-05, -0.0453640483);Seconds = 1.5;Style = Enum.EasingStyle.Sine}} local camera = workspace.CurrentCamera local part = game.Workspace:WaitForChild('153211') local tween = game:GetService("TweenService") local deb = false part.Touched:Connect(function(hit) if hit.Parent:FindFirstChild"Humanoid" then if deb == false then deb = true for i,v in pairs(data) do tween:Create( camera, TweenInfo.new( v.Seconds, v.Style, Enum.EasingDirection.Out, 0, false, 0 ), {CFrame = v.CFrame} ):Play() wait(v.Seconds) end end end end)
It is FindFirstChild("Humanoid") not FindFirstChild"Humanoid"
local data = {{CFrame = CFrame.new(-163.386337, 9.12168503, 86.5627747, -0.190807536, -0.0414887182, 0.980750322, -0, 0.999106526, 0.0422652364, -0.981627524, 0.0080645252, -0.190637022);Seconds = 1.5;Style = Enum.EasingStyle.Sine},{CFrame = CFrame.new(-170.23143, 9.03917599, 87.2517471, -0.0453640521, -0.000388695713, 0.998970389, -0, 0.999999881, 0.000389096298, -0.998970509, 1.76509839e-05, -0.0453640483);Seconds = 1.5;Style = Enum.EasingStyle.Sine}} local camera = workspace.CurrentCamera local part = game.Workspace:WaitForChild('153211') local tween = game:GetService("TweenService") local deb = false part.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then if deb == false then deb = true for i,v in pairs(data) do tween:Create( camera, TweenInfo.new( v.Seconds, v.Style, Enum.EasingDirection.Out, 0, false, 0 ), {CFrame = v.CFrame}) tween:Play() wait(v.Seconds) end end end end)