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

What do I need to fix for my Function script [UPDATED]?

workspace.TryArea1.Touched:connect(function(Handle)
    if Handle.Name == "Handle" then
        print(Handle)
    end
end)

function onPrint (Handle)
	workspace.StarterGui.TRY.TryText.TextTransparency = 0
	wait (5)
	workspace.StarterGui.TRY.TryText.TextTransparency = 1
end

So I have a script which whenever a part named Handle touches it, it would print, 'Handle'. I want a GUI to pop up that says, "TRY!". How could I fix this?

1 answer

game.Workspace.TryArea1.Touched:connect(function(Handle) -- It's not workspace but game.Workspace
    if Handle.Name == "Handle" then
        print("Handle") -- You forgot the "". Use the "" if you want to use text
    end
end)

function onPrint (Handle)
    game.Workspace.StarterGui.TRY.TryText.TextTransparency = 0 -- You changed the ServerGui. This won't do anything. Change it in the Player. 
    wait (5)
    workspace.StarterGui.TRY.TryText.TextTransparency = 1 -- Same here
end

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