You can write your topic however you want, but you need to answer these questions:
-
I want to make door which slides down at the same time button slideing down (biggertween2 is error)
-
**Second tween service having error.
-
**I tried diffrent infos , tween.Completed:Wait()
3 Likes
can you show us the error message that you got on second tween please
Is there any red/yellow line of code?
No there is no red or yellow line
could you show us the full code
Can you show what door exactly is + the hierachy
Full code:
local TweenService = game:GetService("TweenService")
local part = script.Parent
local door = script.Parent.Parent:FindFirstChild("Door")
local db = false
local rooms = game.ReplicatedStorage:WaitForChild("Rooms"):GetChildren()
local info = TweenInfo.new(
1.2, --uzunluk saniye
Enum.EasingStyle.Back, --easing stili
Enum.EasingDirection.Out, --yön
0, --tekrar sayısı
true, --reverse
0 --geçikme
)
local info2 = TweenInfo.new(
1.2, --uzunluk saniye
Enum.EasingStyle.Back, --easing stili
Enum.EasingDirection.Out, --yön
0, --tekrar sayısı
false, --reverse
0 --geçikme
)
local goals = {
Position = part.Position + Vector3.new(0, -0.40, 0)
}
local biggertween = TweenService:Create(part, info, goals)
local biggertween2 =TweenService:Create(door, info2, {Position = door.Position + Vector3.new(0, -40, 0)})
part.Touched:Connect(function(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum and not db then
db = true
biggertween:Play()
biggertween.Completed:Wait()
biggertween2:Play()
local rastgeleOda = rooms[math.random(1, #rooms)]:Clone()
rastgeleOda.Parent = game.Workspace.Stages
rastgeleOda:SetPrimaryPartCFrame(part.CFrame * CFrame.new(0, 0, 1)) -- Oda konumunu ayarlama
end
end)
1 Like
are there any other errors beside the one you sent
Its actually a wall:
the wall needs to go down with button which in front of button
Nah random rooms works well and button’s tween also working normally
Im a try to put button’s tween service to another script.
Oh the issue about door guess.
Ty all I fixed it I forgat the 3. parent so it failed to find door.