Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer

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

2 comments

0

Ill try them out,Thanks!

0

Name is a string; it cannot be nil

This discussion is preserved as it was. New answers, comments, and votes are closed.