【发布时间】:2020-12-12 04:04:46
【问题描述】:
我正在尝试为我的大厅打造一个 ROBLOX 游戏的销售区域。
然而,每当我踏上销售区域(有积分)时,我似乎没有得到任何现金,我的积分也没有改变。
请帮忙?
这是我的代码:
local sellPart = script.Parent
game.Players.PlayerAdded:Connect(function(plr)
sellPart.Touched:Connect(function(hit)
local hrp = hit.Parent:FindFirstChild("HumanoidRootPart")
if hrp then
local player = game.Players:GetPlayerFromCharacter(hrp.Parent)
local zombpoints = player.leaderstats.Zombpoints
local zombcash = player.leaderstats.Zombcash
zombcash = zombpoints
zombpoints = 0
end
end)
end)
希望这会有所帮助。
【问题讨论】: