Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why am I getting an error? It seems to me that the solution is very simple, but I cannot find it.

Asked by 2 years ago
Edited 2 years ago

Why am I getting an error?

A mistake in this moment - "plr.stat.curent.Value=plr.stat.curent.Value+1"

Script:

local Reward = require(game.ServerStorage:WaitForChild("Reward"))
local RewardData = Reward[1]
local stat=RewardData["stats"]
local curent=RewardData["curent"]
local reward=RewardData["reward"]

game.Players.PlayerAdded:Connect(function(plr)
  wait(5)
  plr.stat.curent.Value=plr.stat.curent.Value+1
  end)

ModuleScript:

local day = {
    [1]={
        stats='PlayerStats',
        curent='DoubleXP',
        reward = 100000
        }
}
return day
0
Uh oh i do not understand at scripts i am new may i get answered so might help you! roblox8881215 17 — 2y

Answer this question