Help With Detecting Scrolling & Something else

Hello,

I have question which is, how do you detect when the player is scrolling through a scrolling frame and WHERE IT IS LOCATED and to see if it prompts and Security Class error.

Any answers are appreciated. I saw this was 100% possible, just asking here now.

1 Like

https://create.roblox.com/docs/reference/engine/classes/ScrollingFrame

Look at Canvas Position

and u can just detect when its changed to check when the player is scrolling

1 Like

Hey, yea. But I’m trying to check like, with a singular local script and a loop which will attempt to get the current scrolling frame the player is scrolling on without needing an assigned instance

1 Like
local frame = Instance.new("ScrollingFrame")

local canvaLocation = frame.CanvasPosition

frame:GetPropertyChangedSignal("CanvasPosition"):Connect(function() -- When It changes
	
end)
2 Likes

you can use either SelectionChanged or :GetPropertyChangedSignal("CanvasPosition"):Connect(function()

1 Like

Well, as I said above:

“I’m trying to check like, with a singular local script and a loop which will attempt to get the current scrolling frame the player is scrolling on without needing an assigned instance”

WITHOUT any assigned instance. Which means to just detect if a player is even interacting with one without there needing to be one that already exists

1 Like

you dont have to loop. you can just check when it changes. This is less laggy

frame:GetPropertyChangedSignal("CanvasPosition"):Connect(function() -- When It changes
	
end)

Saying this because I’m making an anti-exploit.

1 Like

well you can just loop through every frame

for i,v:ScrollingFrame in (Holder:GetDescendants()) do
	if v:IsA("ScrollingFrame") then
		v.SelectionChanged:Connect(function()
			
		end)
	end
end

StarterGui:GetGuiObjectsAtPosition(Mouse.Position.X, Mouse.Position.Y-36) will return the GUI object under the mouse. If there are any you can check if that is a “ScrollingFrame” by using :IsA() then perform the necessary actions using the events that @Quantantus linked

1 Like

Well, I think I should be a bit more specific.

I’m trying to detect wheter the player is scrolling through an COREGUI SCROLLING FRAME or PLAYERGUI SCROLLING FRAME which would be an awesome thing to detect exploit UIs which have scrolling frames. It’s 100% possible as i’ve saw like 2 anti exploits do it.

There are various scrolling objects in the CoreGui aside from exploit ones. You should try to use newproxy() to detect them instead. And IIRC core gui isn’t accessible. You cant connect events to its descendants

1 Like

Hmm Okay. You got discord or something so you can explain it a bit more to me?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.