#¿Why does my script dont activate the image tween?

1 messages · Page 1 of 1 (latest)

karmic zenith
karmic zenith
#

hold on let me do the thing

#

if it work

#

``lua
script.Parent.MouseButton1Click:Connect(function()
local TweenService = game:GetService("TweenService")
local part = script.Parent.Parent.msk
local Info = TweenInfo.new(
.4,
Enum.EasingStyle.Exponential,
Enum.EasingDirection.In,
0,
false,
0
)

local Goals = {
    Position = UDim2.new({0, 0},{0, 0});
}

local MoveTween = TweenService:Create(part, Info, Goals)
workspace.sfx["fnaf 2 mask"]:Play()
workspace.sfx["fnaf 2 breathing"]:Play()
MoveTween:Play()
game.ReplicatedStorage.m2:FireServer()

script.Parent.LocalScript1.Enabled = true
script.Parent.Rotation = 90
script.Enabled = false
end)``

#

son

#

first script

#

@polar cliff

polar cliff
#

holy efficiency

#

are there any errors in the output

karmic zenith
polar cliff
#

did u enable it back when testing

karmic zenith
polar cliff
#

smart but not ideal

#

i gotchu

karmic zenith
#

ok

polar cliff
#

@karmic zenith

local TweenService = game:GetService("TweenService")

local opened = false

script.Parent.MouseButton1Click:Connect(function()
    local part = script.Parent.Parent.msk

    local Info = TweenInfo.new(
        .4,
        Enum.EasingStyle.Exponential,
        Enum.EasingDirection[opened and "Out" or "In"],
        0, 
        false,
        0
    )

    local Goals = {
        Position = UDim2.new({0, 0},{opened and -1.2 or 0, 0});
    }

    local MoveTween = TweenService:Create(part, Info, Goals)
    workspace.sfx["fnaf 2 mask"]:Play()
    MoveTween:Play()
    game.ReplicatedStorage[opened and "m5" or "m2"]:FireServer()
    script.Parent.Rotation = 90 * (opened and -1 or 1)

    if not opened then
        opened = true
        workspace.sfx["fnaf 2 breathing"]:Play()
    else
        opened = false
        workspace.sfx["fnaf 2 breathing"]:Stop()
    end
end)
#

one script