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

This Script's Value won't change and it won't find items?

Asked by 10 years ago

I want to make it whenever it finds an item ROBLOX makes, it makes a message.

while true do
    script.Item.Value = script.Item.Value +1

local A = script.Parent.Item.Value
local Asset = game:GetService("MarketplaceService"):GetProductInfo(A)
if A.Creator == "ROBLOX" then
M = Instance.new("Message")
M.Parent = game.Workspace
wait()
M.Text = ("Item Found")..A.Name..
wait(4)
M.Text = ""
end
end

1 answer

Log in to vote
0
Answered by 10 years ago

Error at line 10.

M.Text = "Item Found"..A.Name

And instead of doing M.Text = "" I'd do

M:remove() --Why? Because then Messages will just be spammed in the Workspace.

Also, change M.Parent = game.Workspace, because what if Workspace's name is changed?

M.Parent=game:service("Workspace")
Ad

Answer this question