#¿Why does my script dont activate the image tween?
1 messages · Page 1 of 1 (latest)
ok
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
second script
@polar cliff
nope
I notice in the video, LocalScript1 is disabled
did u enable it back when testing
local1 is the script to make the mask go up
oh i see what youre doing in the code
smart but not ideal
i gotchu
ok
@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