admin 管理员组文章数量: 1086019
part = script.Parent
part.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
plr.PlayerGui.upd.Enabled = true
end)
that script run only once, but must run any time player touching part. Why?
part = script.Parent
part.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
plr.PlayerGui.upd.Enabled = true
end)
that script run only once, but must run any time player touching part. Why?
Share Improve this question asked Mar 27 at 11:26 YanichegoneumeyuYanichegoneumeyu 1 4 |1 Answer
Reset to default -1I found the solution. I created a remote event that sent a request switch GUI to the client
本文标签: luarunning roblox script only onceStack Overflow
版权声明:本文标题:lua - running roblox script only once - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://roclinux.cn/p/1744093159a2532412.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
print("Touched")
inside the function, does it only print once? I think your issue might not be in this code specifically. To better help you out, could you tell us what you are trying to do, and what you are seeing happen? – Kylaaa Commented Mar 27 at 14:19