如何解决我该如何闪烁灯光?
好吧,所以在roblox中,我一直试图发出闪烁的灯光,但似乎不起作用。因此,我尝试查找第一行中的错误,但是..它似乎不起作用,而且我似乎也找不到。
while true do
math.randomseed(tick())
local Brightness = math.random(0.1,1)
local Light = script.Parent
local SpotLight = Light.SL
local RandomPause = (math.random(0.5,5))
wait(RandomPause)
SpotLight.Brightness = Brightness
wait (RandomPause)
SpotLight.Brightness = Brightness
end
解决方法
-
将聚光灯插入零件
-
将此脚本插入到该部分中:
local spotlight = game.Workspace.Light.SpotLight while true do spotLight.Enabled = true wait(2) spotLight.Enabled = false wait(0.1) spotLight.Enabled = true wait(0.3) spotLight.Enabled = false wait(0.5) end
您可以根据需要编辑“等待(时间)”,以加快或减慢闪烁。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。