Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

another gui problem?

function Click()
game.StarterGui.ScreenGui.A.Frame.MessageWIP.Visible = true
wait(2)
game.StarterGui.ScreenGui.A.Frame.MessageWIP.Visible = false
end
script.Parent.ClickDetector.MouseClick:connect(Click)

****this is with a part, not a gui.

1 answer

✓ Accepted answer

Classic error. Modifying the StarterGui will modify it for new or respawning players. In your case, you'd want to edit PlayerGui.

Simple edits, such as;

debounce = false --Add a debounce so it doesn't get spammed.
script.Parent.ClickDetector.MouseClick:connect(function(player) --An easier way to connect, also defines the player who clicked it.
	if debounce == false then --Check if the debounce is "false"
		debounce = true --Enable the Debounce
		player.PlayerGui.ScreenGui.A.Frame.MessageWIP.Visible = true
		wait(2)
		player.PlayerGui.ScreenGui.A.Frame.MessageWIP.Visible = false
		debounce = false --Disable the Debounce
	end
end)

6 comments

0

you have to do a function

1

This looks like it would work. Great answer!

1

@bossay, This answer has a function, "connect(function(player) ".

0

but it didnt work

0

Please remember this won't work with FilteringEnabled as it modifies assets. To use FE with it, you'd have to incorporate RemoteEvents.

0

thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.