Gui properties not changing what so ever / Tweening and Visibility

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()
2 Likes

I have a question where is your script located? The first one you mentioned. Because I noticed that one of your events is as script.Parent.Parent

Its located into a play button

1 Like

I’d suggest putting the remoteevent in the ReplicatedStorage

1 Like

I tried using a remote event but it still didn’t work

1 Like

You shouldn’t use a remote event with a UI because the UI is local unless you want to change all of the users client. In this case it seems that it’s the user that is causing change.

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()

right here I would suggest removing the destroy and seeing what happens.
I’m assuming the script is getting ahead of itself.

1 Like

Okay I’ll try it thx I’ll reply after testing it

1 Like

It still seems to not be working.

1 Like

Where is the fired event going to anyways? It’s not sending anything to a script.

1 Like

the event that fires is for teleporting the HumanoidRootPart it doesn’t effect the gui and the teleport works

1 Like

Ok, I see now. The second script you posted is it the full script? If so can you post it?

1 Like

The full script is the first one I posted. The second one is the one that seems to not work

1 Like

I see but the first script is just the camera tweening i see and other visual things.

It tweens the camera and that works prefect just not the gui tween

is

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()

just the whole script or is there more to it?

The script you just posted is just the part that won’t work. It’s connect with the script above it

1 Like

Can I see the rest of it then?

This may be the issue.

Roblox recently made an update introducing drafts in team create, for your script to run you have to commit the changes you’ve made in the new windo called “Drafts” found in the view tab.

Screenshot_2091

2 Likes

Scroll to the very top and thats the full script

ohh so they are the same script