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

I need help with a hint script [?]

Asked by 8 years ago

this is the code:

while wait(0.1) do
local uno = game.Workspace:FindFirstChild("Unobtainium")
if uno ~= nil then
    local hint = Instance.new("Hint")
    hint.Text = "Unobtainium has been found in"
    hint.Parent = game.Workspace
    end
end

the code doesn't work and there are no errors in output or in script analysis.

1 answer

Log in to vote
0
Answered by
GShocked 150
8 years ago

I renamed Baseplate to Unobtainium and your script seemed to work. Although I would change a few things to make it cleaner.

while wait(0.1) do
    local uno = game.Workspace:FindFirstChild("Unobtainium")
    if uno ~= nil then
        local hint = Instance.new("Hint", game.Workspace)
        hint.Text = "Unobtainium has been found in"
    end
end

Make sure you spelled Unobtainium correctly and that its parent is Workspace? I don't really know why this doesn't work for you.

Ad

Answer this question