In StarterGui there should be a screengui named BlackScreen (Enabled) with a frame named Frame. Then paste this in a script in a part with a click detector inside:
It’s fine if you can send the script over we can give it a shot and fix it up. Is it just the gui and kick in the script or is there another function in it?
Good golly what is happening in this thread? Let’s start this again. OK so you want to make a black frame appear in the players gui and the player disconnect on clicking a brick. Changes to ui should be done locally, and contrary to what some replies state, you can safely kick a client locally, but this may not be 100% secure against exploiters if that’s a concern. As this uses a gui, it’s probably best to use a local script placed inside the frame you want to make appear. Set up the frame plus localscript inside a ScreenGui inside StarterGui and then turn ‘visible’ for the frame off. Then add this code:
local ClickDetector = game.Workspace....
local Frame = script.Parent
local Player = game.Players.LocalPlayer
ClickDetector.MouseClick:Connect(function()
Frame.Visible = true
Player:Kick()
end)
And just make sure to point the click detector and frame variables to the right places. Apologies for any typing errors, I’m sending this from my phone.
With regards to using game:GetService() for players and workspace, yes, this is technically the ‘right’ way to do it, but please don’t needlessly clog up help threads pointing this out and debating about it, as it just confuses the topic and detracts from actually solving the problem.