local TimeText = script.Parent.TimeText
local Playing = script.Parent.Parent.Parent.Playing
local Time = 0
local MinTime = 6
while wait() do
if Playing.Value == true then
TimeText.TextColor3 = Color3.new(0.941176, 1, 0.25098)
TimeText.Visible = true
Time+=.03
TimeText.Text = Time…“s”
elseif Playing.Value == false then
TimeText.TextColor3 = Color3.new(0.329412, 1, 1)
if Time < MinTime then
script.Parent.Parent.Parent:Kick(“”)
end
Time = 0
end
end
there is no error but i want to make this: if player finished the parkour under 6 seconds player get kick.
this code make this; when i joining the game i get kick
this code in a gui, local script