This is in a localscript and it works fine in studio but not in the game. Help?
local access = script.Parent.Parent.Access script.Parent.FocusLost:connect(function() if script.Parent.Text == "Roblox" then access.Text = "Access Granted" access.TextColor3 = Color3.new(0, 255, 0) end end)
Thanks
To make this more efficient, and after looking how this is setup, I've made a end result of a working script that will do just the job.
LocalScript in the MainFrame
local frame = script.Parent local words = frame.Welcome local player = frame.Parent.Parent.Parent local access = script.Parent.Access local box = script.Parent.TextBox words.Text = "Welcome to the multiverse, " ..player.Name box.FocusLost:connect(function() if box.Text == "Roblox" then access.Text = "Access Granted" access.TextColor3 = Color3.new(0,255,0) end end)
Have a wonderful day! :)