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

What is wrong with this Hint script?

Asked by
IcyEvil 260 Moderation Voter
9 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

I'm making a Hint script that should say "Currently No Map is Running" If all of the maps are nil (3) But I am having a bit of a problem

07:03:00.952 - sft is not a valid member of Workspace

I feel after that gets fixed it will go onto the next one, So I will give you all the maps

  1. sft 2.gft 3.obby

Please Help if you can.

EDIT

while wait() do
local h = Instance.new("Hint")
local sftg = game.Workspace.sft
local gftg = game.Workspace.gft
local obbyg = game.Workspace.obby

if sftg == nil or gftg == nil or obbyg == nil then
h.Text = "There is Currently No Map Running"
end
end
0
Theres like no script to work with how do you expect people to be able to help you if you're afraid somebodies going to steal it their not Prioxis 673 — 9y
0
Do you ask a doctor to heal you but not allow him to see you in person? No. In order to fix you code problems, we must have code. ZeptixBlade 215 — 9y
0
Oh Shoot, Sorry Guys I was in a rush this morning. IcyEvil 260 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

You need to use FindFirstChild()

local v = a.b --Variable "a" exists, but "b" does not, so it breaks
local v = a:FindFirstChild('b') --Again, "b" does not exist, but it returns nil instead of breaking
Ad

Answer this question