Script suddenly stopped working..?

Hi! So yesterday I started development on a main menu for a game I am working on. I made a working button that fades out, triggers tweens and what not. I then took a break for a few hours and came back only to see that it literally just does not work anymore. Here’s a video. -

Here’s the (I think…) public game that shows what its supposed to look like, I uploaded it to show a friend before all of this happened. - https://www.roblox.com/games/9802370630/Montana-2001-ALPHA

0 Console errors whatsoever either. I have a plugin that checks for viruses, 0 viruses found. It’s odd. Here is the entire script if needed.

local button = script.Parent
local selectsound = workspace.UISounds.open
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(0.3, Enum.EasingStyle.Quad)
local hoversound = workspace.UISounds.hover
local Goalone = {BackgroundColor3 = Color3.new(1, 1, 1)}
local colorTweenone = tweenService:Create(button, TweenInfo.new(0.3), Goalone)
local Goaltwo = {BackgroundColor3 = Color3.new(0, 0, 0)}
local colorTweentwo = tweenService:Create(button, TweenInfo.new(0.3), Goaltwo)
local startposlogo = UDim2.new(0.25, 0, 0.249, 0)
local goalposlogo = UDim2.new(0.481, 0, 0.081, 0)
local logo = script.Parent.Parent.Parent.IntroSequence.Text4
local camera = workspace.campart


button.MouseButton1Click:Connect(function()
	tweenService:Create(button, tweenInfo, {BackgroundTransparency = 1}):Play()
	tweenService:Create(button, tweenInfo, {TextTransparency = 1}):Play()
	selectsound:Play()
	wait(0.6)
	button:Destroy()
	logo:TweenPosition(
		UDim2.new(0.481, 0, 0.081, 0),
		"Out",
		"Quad",
		0.3
		
	)
end)

button.MouseEnter:Connect(function()
	hoversound:Play()
	colorTweenone:Play()
end)

button.MouseLeave:Connect(function()
	colorTweentwo:Play()
end)
2 Likes

Does the colorTweenone and two have an easing style?

Yeah, its defined by TweenInfo.

I don’t see EasingDirection. Make sure to add that.

EDIT: I also think you need to move
tweenService:Create(button, tweenInfo, {TextTransparency = 1}):Play()
into seperate lines, like:

local tween1 = tweenService:Create(button, tweenInfo, {TextTransparency = 1})
tween1:Play()

This TweenInfo.new is not defined, it is created.

1 Like

Ah, yes. as @RMofSBI said. You need to insert your previously made tweeninfo. Not create a new one.

1 Like

Check your output. Any errors?

I honestly don’t think it has to do anything with tweens. These exact tween script lines have not been touched and they were working until now. I removed the tween scripts now and still nothing works. I think it could be something else, but I could be wrong.

Nope. Zero errors in the output menu.

1 Like

Is the tween the only issue here? All the other functions are working as expected? Is this a team create and has anyone else been in this development?

Nope, nothing works in the button script. The sound doesn’t work for example. I don’t have team create enabled for this project.

Is the GUI enabled? I dont see anything in the script enabling the gui and it is unchecked in your video.

Edit: have you edited any other GUIs in this time? you might need to Zindex them if so.

The MainMenuCrap GUI is enabled. But even when I enable the other one, it still does not work. I haven’t edited any other GUIS. Here’s what it is with all of the GUIS enabled.

1 Like

You mentioned the sound doesnt work… you referring to the hover sound? has this sound been flagged in your Audio Discovery plugin? if so, it might be the cause

Edit: but then it would show in ouput as error… hmmm, nvm

Re-Edit: have you enabled any beta features in this time, or enabled any plugins that relate to UI?

Nope, I have a few UI Plugins but havent touched them, in this project atleast.

1 Like

Have you tried moving this UI over to an empty baseplate and just testing it there (with the few elements you need like sound, etc.)?

I will go ahead and
try that now.

1 Like


Works here. Super weird…

Wait! I just took out the logo tween and it’s working all of the sudden. Super weird considering it was working before all of this happened. Guess I’ll rewrite that code. Thank you guys!

3 Likes