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

I dont understand the error "Attempt to call a nil value". PLease explain to me?

Asked by
TNTIsLyfe 152
4 years ago

I made this round script for a round based game but whenever it finishes the intermission part it says a error "Attempt to call a nil value: Line 11" i dont understand the error so can u please help? Heres the script

01local I = 30
02local Hint = Instance.new("Hint")
03Hint.Parent = game.Workspace
04Hint.Name = "Intermission"
05while true do wait (1)
06I = I - 1
07game.Workspace.Intermission.Text = "Intermission: "..I
08if I == 0 then
09local Round = 1
10if Round == 1 then
11Round1()
12break
13end
14end
15end
View all 61 lines...
0
Your trying to do something that doesnt exist. You dont need the parameters after Round1 and change round1 to round. JesseSong 3916 — 4y
0
ok TNTIsLyfe 152 — 4y
0
what does that mean? TNTIsLyfe 152 — 4y
0
? TNTIsLyfe 152 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

Howdy!

The error basically says that you're referring to something that doesn't exist. From your script, it looks like you're trying to fire a function called Round1() but the server is saying such a function doesn't exist. You need to put the function above the trigger so that the server knows to look back onto what you're talking about.

If this helped you out, consider accepting this answer for those sweet, sweet reputation points. If not, comment below and I (or someone else) will help you out.

Be sure to check out the Roblox API Documentation as well for additional reference.

0
oh cool ur idea worked TNTIsLyfe 152 — 4y
Ad

Answer this question