I’ve had this problem for a long time, and i can’t figure out why, does the event itself not work?
Are you using it on a LocalScript? Could you show the code at least so we can see what the problem is?
I don’t think you should use this event, because the developer resource doesn’t recommend it.
Just use guibutton.MouseButton1Click()
But what if I want to make it mobile compatible?
script.Parent.Activated:Connect(function()
print("Pressed")
end)
It’s a server script btw
Doesn’t it also work on mobile? Hold on, i’m gonna try that with the emulator.
If it’s a server script, it won’t work. Use a remote event. GUI doesn’t really replicate to the server.
I dont think Activated works on Server Scripts. It may only work in LocalScripts only.
Try converting this into a LocalScript.
Wow, mousebutton1down works on mobile, who would have guessed lol.
Yes, MouseButton1Click (and the other MouseButton events) work for PC and Mobile. However, MouseButton1Down or MouseButton1Up can kind of be buggy when on mobile.
Although there is not much of a difference between MouseButton1Click and Activated, I would still recommend using the Activated event.
notice Activated event requires to be linked from a LocalScript only, AND LocalScript can ONLY access RELATIVE hierarchy of paths, i.e. such as script.Parent.Parent, script.Parent:FindFirstChild() and so on; LocalScripts can never access objects directly, by their absolute addresses
seems to be a typical “security” feature for platforms such as Roblox