#Trying to tween eyes closed + Track the player.
1 messages · Page 1 of 1 (latest)
-- GIANT CUPCAKE --
local cupcake = workspace.Map.Map:WaitForChild("giantCupcake")
local gCHeadData = cupcake:WaitForChild("Head")
local gCcontainer = cupcake:WaitForChild("cupcakeZone")
local gCZone = zonesPlus.new(gCcontainer)
local lerpAlpha = 0.05
gCZone.localPlayerEntered:Connect(function()
local gCLoop
gCLoop = runService.RenderStepped:Connect(function()
local targetPos = pHead.Position
tweenServ:Create(gCHeadData.RightUpperEyelid, TweenInfo.new(2), {Position = Vector3.new(45.227, 6.576, 353.288), Orientation = Vector3.new(-0, 100, -180)}):Play()
tweenServ:Create(gCHeadData.RightLowerEyelid, TweenInfo.new(2), {Position = Vector3.new(45.225, 6.159, 353.276), Orientation = Vector3.new(-0, 100, -180)}):Play()
tweenServ:Create(gCHeadData.LeftUpperEyelid, TweenInfo.new(2), {Position = Vector3.new(42.265, 6.576, 353.818), Orientation = Vector3.new(-0, 100, -180)}):Play()
tweenServ:Create(gCHeadData.LeftLowerEyelid, TweenInfo.new(2), {Position = Vector3.new(42.263, 6.159, 353.805), Orientation = Vector3.new(-0, 100, -180)}):Play()
task.wait(2.5)
--Head--
local gCHead = cupcake.Head
local gCHeadPivot = gCHead:GetPivot()
local gCHeadPos = gCHeadPivot.Position
local gCLookAt = Vector3.new(targetPos.X, gCHeadPos.Y, targetPos.Z)
local targetY = CFrame.lookAt(gCHeadPos, gCLookAt, Vector3.new(0,1,0))
local gCLerp = gCHeadPivot:Lerp(targetY, lerpAlpha)
gCHead:PivotTo(gCLerp)
--Eyes--
local gCEyes = cupcake.Head:WaitForChild("Eyes")
for _, eye in ipairs(gCEyes:GetChildren()) do
if eye.Name ~= "PrimaryEyes" then
local eyePos = eye.Position
eye.CFrame = CFrame.new(eyePos, targetPos)
end
end
gCZone.localPlayerExited:Connect(function()
gCLoop:Disconnect()
tweenServ:Create(gCHeadData.RightUpperEyelid, TweenInfo.new(2), {Position = Vector3.new(45.244, 6.549, 353.387), Orientation = Vector3.new(0, 100, -150)}):Play()
tweenServ:Create(gCHeadData.RightLowerEyelid, TweenInfo.new(2), {Position = Vector3.new(45.249, 6.218, 353.416), Orientation = Vector3.new(0, 100, 135)}):Play()
tweenServ:Create(gCHeadData.LeftUpperEyelid, TweenInfo.new(2), {Position = Vector3.new(42.283, 6.549, 353.917), Orientation = Vector3.new(0, 100, -150)}):Play()
tweenServ:Create(gCHeadData.LeftLowerEyelid, TweenInfo.new(2), {Position = Vector3.new(42.288, 6.218, 353.945), Orientation = Vector3.new(0, 100, 135)}):Play()
end)
end)
end)
just animate it 🥀
maybe move the tweens outside the loop?
** You are now Level 1! **
how could I animate it tho? I literally could not rig that thing if i wanted to
its just a cupcake doe
** You are now Level 8! **
wont that mess up the following script + dont the parts need to be names like "upper arm" and stuff?
yeahhh thats why i was doing tweening
do you know how I could get the tweening to work
run it seperately
** You are now Level 7! **