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

Workspace.GiveValues:14: attempt to call field 'Name' (a string value)?

Asked by 9 years ago
01game.Players.PlayerAdded:connect(function(player)
02 
03 
04    local stats = Instance.new("IntValue", player)
05    stats.Name = "leaderstats"
06 
07 
08    local points = Instance.new("IntValue", stats)
09    points.Name = "Points"
10 
11    local ingame = Instance.new("BoolValue", player)
12    ingame.Name "InGame"
13 
14 
15end)
0
Where is line 14 here? Perci1 4988 — 9y
0
for i = 0, 1, 0.06 do thats what line 14 is but it doesn't have anything about name RetroThieff 5 — 9y
0
I'm thinking its line 39 and under RetroThieff 5 — 9y
0
No, i mean, look at your original code and look for line 14. Then tell me the corresponding line number for this code, since they aren't lining up obviously. Perci1 4988 — 9y
View all comments (5 more)
0
Sorry I'm pretty new at scripting what do you mean original code? Isn't this the original code? I have no other scripts in the game. Please don't get mad at me. RetroThieff 5 — 9y
0
if this isn't a snippet of the script and it is the full script, that means we're getting the error from another script. HungryJaffer 1246 — 9y
0
Oh you know what I did make a leaderboard script thats the problem but I still don't know how to fix it. Should I replace the script up there with the leaderboard one? RetroThieff 5 — 9y
0
There we go I replaced it RetroThieff 5 — 9y
0
Line 14 is line 12 on this version. RetroThieff 5 — 9y

2 answers

Log in to vote
0
Answered by 9 years ago
01minigames = game.Lighting.Minigames:GetChildren()
02h = Instance.new("Hint", game.Workspace)
03 
04function removePlate()
05    local plates = game.Workspace.DisappearingPlates.Plates:GetChildren()
06    local ranNum1 = math.random(1,#plates)
07    local ranNum2 = 1
08    while ranNum1 == ranNum2 do
09    local ranNum2 = math.random(1,#plates)
10    wait(1)
11    end
12    local plateChosen = plates(ranNum1)
13    local plateChosen2 = plates(ranNum2)
14    for i = 0, 1, 0.06 do
15        plateChosen.Transparency = i
View all 69 lines...
0
Man, how did one little script he asked made it into a long script RobotChitti 167 — 9y
0
He changed the script. HungryJaffer 1246 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

I fixed it. I just forgot an equal sign in there

01-- Made by RetroThieff
02 
03game.Players.PlayerAdded:connect(function(player)
04 
05 
06    local stats = Instance.new("IntValue", player)
07    stats.Name = "leaderstats"
08 
09 
10    local points = Instance.new("IntValue", stats)
11    points.Name = "Points"
12 
13    local ingame = Instance.new("BoolValue", player)
14    ingame.Name = "InGame"
15 
16 
17end)

Answer this question