Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

my cut scene does not end and it does not give me bounce effect ?

Asked by 4 years ago

this is my script

local camera = game.WorkSpace.Camera

game.ReplicatedStorage.HatchEgg.OnClientEvent:Connect(function(pet)
    camera.CameraType = Enum.CameraType.Scriptable
    camera.CFrame = studio.CamPart.CFrame


local tweenInfo = TweenInfo.new(
     2,
     Enum.EasingStyle.Bounce,
     Enum.EasingDirection.Out,
     0,
     false,
     0

)

    local tween = TweenService:Create(camera, tweenInfo, {CFrame = CFrame.new(petClone.PrimaryPart.Position + (petClone.PrimaryPart.CFrame.lookVector * 5) + Vector3.new(0,0.75,0)),petClone.PrimaryPart.Position}) 

    tween:Play()

    wait(1)

    for i, v in pairs(studio.Particle:GetChildren()) do
        if v:IsA("ParticleEmitter") then
            v.Enabled = false           


    camera.CameraType = Enum.CameraType.Custom
    studio.Egg.Transparency = 0
    studio.Egg.Size = Vector3.new(5.143, 6.3, 5.243)
        petClone:Destroy()


end         
end
end)

script does not have any errors also its a part of alvin bloxs script from video pet hatching system but i dont see anything wrong in this script please help

0
you forgot to add stop. badimo3456p 114 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago

For smooth smooth movement I use the following structure:

while wait() do
if *logic* then
Interpolate(*data*)
end
end

this structure makes a beautiful effect ;)

Ad
Log in to vote
0
Answered by 4 years ago

i found out my problem its at line 18 when there is vector3.new and brackets with position there is another bracket after it its a closing bracket that needs to come at last

Answer this question