Help, my message script is not working!

Hey, so the thing is, I want to create a server-sided message with clickdetector that tells the players who activated the emergency generator for my game, but it doesn’t work and I don’t see any warning in the output that shows the cause, what is wrong with my script?

Message is Deprecated
and :Remove() is also Deprecated

debounce is a Global Variable. And lowercase :connect is also Deprecated

Try printing the player

1 Like

MouseClick gives the Player as the parameter, not the character.


so how can I fix it? if message is deprecated and remove() too?

Use Destroy() instead of Remove and Connect instead of connect. And for message… Your Own gui and a RemoteEvent

1 Like

message works but when I add findfirstchild, it doesn’t.

local debounce = false
function onClicked(click)
	if debounce == false then
		debounce = true
		local message ="Message")
		message.Parent = workspace
		message.Text = click.Name.." Activated The Generator"
		debounce = true

click is the player who clicks the object

As @DarkContinuum stated. The first Parameter is the Player not the Character. And Message is deprecated, u can still use it. But it won’t have Bug Updates

1 Like

You’re using a deprecated function, use :Destroy() instead of :remove().
And make sure debounce is a local variable (add local before it)

1 Like

Okay, thanks guys, :heart: I fixed it