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

Is there an event for whenever a player takes a screenshot in game?

I doubt it'll be indepth, but is there an event that calls whenever it happens?

4 comments

0

I'm quite curious as to why you'd need something like that.

1

Invasion of privacy! Of course not!

0

I'm trying to make a spoiler filter. Stop people from leaking images from my game

0

It works for me in Test Server in a localscript. (edit) Hmm, that's strange. It appears in the client's output window in studio but not the output window in the F9 menu.

1 answer

✓ Accepted answer

You sort of can using LogService.MessageOut in a LocalScript.

To apply this to your code, use

game:GetService("LogService").MessageOut:Connect(function(msg, msgType)
	if msg == "Screenshot saved! Click here to open screenshot folder." 
 and msgType == Enum.MessageType.MessageInfo then
		print("You took a screenshot!")
	end
end)

msg is, obviously, the message to the output and msgType is like if it was a warning, error, etc.

Hope this helps!

2 comments

0

Doesn't seem to work in testing mode. Am I not able to access this service in a normal play through? Additionally, while I see the message "Screenshot saved! Click here to open screenshot folder." in the client side, the event doesn't trigger

0

Another problem, this event doesn't get triggered in-game. Is there no way of pulling this off then?

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