Roblox Studio 复选框

你好,我正在制作一个 Roblox GUI,并且我有一个已经制作好的复选框。它之前是工作的,但是我不知道我做了什么,我甚至没有在复选框上工作,但以下是代码


function KILLCB_CheckChanged()
if checked == false then
checked = true
script.Parent.Text = "X"
elseif checked == true then
checked = false
script.Parent.Text = ""
end
end

script.Parent.MouseButton1Down:connect(KILLCB_CheckChanged)

while true do
script.Parent.lblText.BackgroundColor3 = script.Parent.Parent.BackgroundColor3
wait(1)
end
点赞
用户2858170
用户2858170

在提供的代码中,checkednil,所以 CheckChanged 不会做任何事情。因此,你的复选框无法工作。

2021-03-30 13:03:55