[英]attempt to compare nil < number?
我試圖改變以在客戶端獲取 zamount 的值,但它返回為零,有人可以幫忙嗎?
腳本:
script.Parent.MouseClick:Connect(function(plr)
if plr.Team == game.Teams.Mastermind then
local zombiespawn = script.Parent.Parent
game.ReplicatedStorage.Events:WaitForChild("Onzombiespawnclick"):FireAllClients(plr,script.Parent.Parent.CFrame ,zombiespawn)
end
end)
本地腳本:
game.ReplicatedStorage.Events:WaitForChild("Onzombiespawnclick").OnClientEvent:Connect(function(spawncframe, zombiespawn)
script.Parent.Visible = true
zombiespawnreference = spawncframe
zombieamountreference = zombiespawn:FindFirstChild("Zombieamount").Value
end)
if zombieamountreference < game.ReplicatedStorage.Vals:WaitForChild("Zombieamountlimit").Value then
if not debounce then
debounce = true
script.Parent:WaitForChild("Placeevent"):FireServer(zombiename, zombiespawnreference, power, zombieamountreference)
wait(0.3)
debounce = false
end
end
沒關系,我必須在客戶端事件參數上放置一個播放器對象。 它現在固定
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.