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

Name problems,Such as "If" function, Help?

Asked by
iLegitus 130
9 years ago

So ive tried putting this into a local script,Inside starterpack.

if script.Parent.Name["Micacalt"] then
    Instace.new("Message", game.Workspace)
    game.Workspace.Message.Text = "The Owner,Is here"
    wait(3)
    game.Workspace.Message:remove()
end

And so,It did not work for some odd reason.

Could anyone help me with this?

1 answer

Log in to vote
1
Answered by 9 years ago

what do you mean by "script.Parent.Name["Micacalt"] "

if script.Parent.Name["Micacalt"] then
    Instace.new("Message", game.Workspace)
    game.Workspace.Message.Text = "The Owner,Is here"
    wait(3)
    game.Workspace.Message:remove()
end

Do you mean this?

if script.Parent.Name =="Micacalt" then
end

or

if script.Parent.Name~=nil then
end
0
Ill try them out,Thanks! iLegitus 130 — 9y
0
Name is a string; it cannot be `nil` BlueTaslem 18071 — 9y
Ad

Answer this question