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

I don't understand why this doesn't work?

Asked by 10 years ago

I am making a Murder game, but it's not adding the name. Help?

names = {"Nick","Kyle","Loucy","Chris","Harry","Mia"}


while true do
    script.Parent.Text = "Game starting..."
    wait(10)
    script.LocalScript.Disabled = false
    name = Instance.new("BillboardGui")
    newname = Instance.new("TextLabel")
    newname.Parent = name
    name.Parent = Head
    newname.BackgroundTransparency = 1
    newname.FontSize = "Size24"
    newname.Text = (#names)
end
0
Why'd I get -1? Grenaderade 525 — 10y

1 answer

Log in to vote
-2
Answered by 10 years ago

Try

newname.Text = math.random(1,#names)

And there is no variable "Head" try to be more specific like... game.Players.LocalPlayer.Character.Head

IMPORTANT: If you do use LocalPlayer then it might or might not need to be in local script

And unless there is a script inside called "LocalScript" put script.Disabled

0
It does not work. Grenaderade 525 — 10y
0
Try that. fireboltofdeath 635 — 10y
Ad

Answer this question