-
I wanna achieve simple math example to prevent bots join game
-
Issue is, each time when i’m writing right answer in text box i’m still being kicked, idk why. Here is screenshots:

-
I tried to change numbers, but i’m still being kicked. I tryed to find anything on youtube/dev hub, but nothing was found.
Here is script:
local x = 1
local y = 1
local z = x + y
local Player = game.Players.LocalPlayer
script.Parent.FirstNumber.Text = x
script.Parent.SecondNumber.Text = y
script.Parent.Frame.TextButton.MouseButton1Click:Connect(function()
if script.Parent.TextBox.Text == z then
script.Parent.Parent.Parent.Enabled = false
else
Player:Kick("Wrong, try again")
end
end)
I’m beginner scripter, so sorry if this very simple error.
