I already have a gui , kick button and frame. The frame composed of someone typing the name in a box, and under it there is a reason for why kicking. I put this in the gui, but it is noit working, any help?
local frame = script.Parent.Frame local kickbutton = script.Parent.KickButton frame.kickbutton.MouseButton1Click(function() if game.players:FindFirstChild(frame.player.Text)then game.ReplicatedStorage.KickPlayer:FireServer(frame.player.text, frame.Reason.Text) end end)
Your wrong is on line 4
frame.kickbutton.MouseButton1Click(function()
To run function use :Connect(function()
That all you need to change
Here is script
local frame = script.Parent.Frame local kickbutton = script.Parent.KickButton frame.kickbutton.MouseButton1Click:Connect(function() if game.players:FindFirstChild(frame.player.Text)then game.ReplicatedStorage.KickPlayer:FireServer(frame.player.text, frame.Reason.Text) end end)