I have made this script to destroy a frame, but it can't seem to work. Can somebody please explain why?
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Frame = script.Parent.Parent
script.Parent.MouseButton1Click:Connect(function()
Frame:Destroy()
end)

4 comments
What script is this? Are there any errors? Give us kore details rather than "It wont destroy it".
It worked fine to me, did you user a server script or a local script when you wrote this?
Odds are that you're using a server script. Just make it local.
I fixed it now, the thing is I used ScreenGui, instead of PlayerGui