I want a thing so I if someone pastes something into the chat then it would print what they pasted .
I'm not sure where to start, so if anyone can give me an example it would be great
I want a thing so I if someone pastes something into the chat then it would print what they pasted .
I'm not sure where to start, so if anyone can give me an example it would be great
Check if the textbox is changed, and if CTRL + V is being held down at the same time.
local chatbox = game:GetService('Players').LocalPlayer.PlayerGui.Chat.Frame.ChatBarParentFrame.Frame.BoxFrame.Frame.ChatBar;
local UserInputService = game:GetService('UserInputService');
chatbox.Changed:Connect(function()
if (UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) or UserInputService:IsKeyDown(Enum.KeyCode.RightControl)) and (UserInputService:IsKeyDown(Enum.KeyCode.V)) then
print(chatbox.Text)
end
end)
local chatbox = game:service'Players'.LocalPlayer.PlayerGui.Chat.Frame.ChatBarParentFrame.Frame.BoxFrame.Frame.ChatBar
if chatbox then
chatbox.Changed:Connect(function()
print(chatbox.Text)
end)
end
ps. only works on localscript (so your going to have to fireserver or something)
wouldnt that print every letter they type?
Yes, there is no method to detect a clipboard paste, unless you got the difference from the text in the box then the text in the box after a change and if it is more than 2 characters you can probably say its pasted.
can u give me an example for that?
Use userinputservice and check for CTRL + V held at the same time.
can i have an example?
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Not possible.