I’m trying to tween some stuff and for the most part it works but 1 specific tween doesn’t work whats so ever. When I click play / F5 it works fine but when I go in team create or do a click test / F7 it just won’t work.
Whats supposed to happen: https://gyazo.com/d84e4629196ebd93d24ed5831c23bdbb
What happens instead: https://gyazo.com/5cf1edac760e894423e3b8d314846cea script:
local frame = script.Parent.Parent.Parent
local plr = game.Players.LocalPlayer
local RemoteEvent = script.Parent.Parent.RemoteEvent
local ts = game:GetService("TweenService")
local info = TweenInfo.new(3, Enum.EasingStyle.Linear, Enum.EasingDirection.In)
local properties = {CFrame = workspace.CharacterCustomization.camerapart.CFrame}
local cam = workspace.CurrentCamera
local tween = ts:Create(cam, info, properties)
script.Parent.MouseButton1Click:Connect(function()
script.Parent.TextTransparency = 1
script.Parent.Parent.Shop.TextTransparency = 1
script.Parent.Parent["Map Selection"].TextTransparency = 1
game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
tween:Play()
repeat
wait(0.05)
frame.InnerFrame.Play.BackgroundTransparency = frame.InnerFrame.Play.BackgroundTransparency + 0.1
frame.BackgroundTransparency = frame.BackgroundTransparency + 0.1
game.Lighting.Blur.Size = game.Lighting.Blur.Size - 1
until game.Lighting.Blur.Size == 0
game.Players.LocalPlayer.PlayerGui.camera:Destroy()
if game.Lighting.Blur.Size == 0 then
RemoteEvent:FireServer()
script.Parent.Parent.Parent.Parent.Parent.CharacterCustomize.Frame.Visible = true
script.Parent.Parent.Parent.Parent.Parent.CharacterCustomize.Frame:TweenSizeAndPosition(UDim2.new(0.221, 0,0.776, 0), UDim2.new(0.028, 0,0.11, 0), "Out", "Linear", 2)
wait(1)
script:Destroy()
else
plr:Kick("Error Loading Guis")
end
end)
It works when I click play at the top of the screen but not when I do team create or click test
This is the line that won’t work:
script.Parent.Parent.Parent.Parent.Parent.CharacterCustomize.Frame.Visible = true
script.Parent.Parent.Parent.Parent.Parent.CharacterCustomize.Frame:TweenSizeAndPosition(UDim2.new(0.221, 0,0.776, 0), UDim2.new(0.028, 0,0.11, 0), "Out", "Linear", 2)
wait(1)
script:Destroy()