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

Why is this hint script not working?

Asked by
IcyEvil 260 Moderation Voter
10 years ago

Hello, My friends...

Today im asking you why This Hint Script I have made doesn't work, I have classified everything into a proper group(s) etc...

And it isn't showing a Hint at all

Any Ideas why?

local h = Instance.new("Hint")
local sftg = game.ServerStorage.sft and game.Workspace.sft
local gftg = game.ServerStorage.gft and game.Workspace.gft
local obbyg = game.ServerStorage.obby and game.Workspace.obby

while wait() do
if sftg.Parent ~= game.Workspace and gftg.Parent ~= game.Workspace and obbyg.Parent ~= game.Workspace then
h.Parent = game.Workspace
h.Text = "Currently There is no map running..."
end
if sftg.Parent == game.Workspace and gftg.Parent ~= game.Workspace and obbyg.Parent ~= game.Workspace  then
    h.Parent = game.Workspace 
    h.Text = "Currently SwordFight is Running..."
end
end

if gftg.Parent == game.Workspace and sftg.Parent ~= game.Workspace and obbyg.Parent ~= game.Workspace then
    h.Parent = game.Workspace
    h.Text = "Currently GunFight is Running..."
end

if obbyg.Parent == game.Workspace and sftg.Parent ~= game.Workspace and gftg.Parent ~= game.Workspace then
    h.Parent = game.Workspace
    h.Text = "Currently Obby is Running..."
end

2 answers

Log in to vote
0
Answered by 10 years ago

Try replacing wait() to true

BTW this is my first answer

0
the wait() does not affect it from being true it Only makes it not run extremely fast and crashing studio. IcyEvil 260 — 10y
Ad
Log in to vote
0
Answered by
pyro89 50
9 years ago

The first line of the script is the problem. You stated that there was a new Hint, but you did not specify exactly where it is.

local h = Instance.new("Hint")

Instead, if you showed that it was somewhere in Workspace or another location, I'm sure it would work just fine.

local h = Instance.new("Hint", game.Workspace)
0
But sir, I do have the hints parent in there already.. "if sftg.Parent == game.Workspace and gftg.Parent ~= game.Workspace and obbyg.Parent ~= game.Workspace then h.Parent = game.Workspace h.Text = "Currently SwordFight is Running..."" IcyEvil 260 — 9y

Answer this question