So, I feel kind of embarrassed for not knowing how to fix this or how to even do it correctly in the first place, but what I'm trying to do is make a script enabled when the player touches a part. This is in a local script.
local plr = game.Players.LocalPlayer local name = plr.Name script.Parent.Touched:Connect(function(hit) if hit.Parent.Name == name then plr.PlayerGui.ArmorShopOwner.Frame.TextLabel.NPCTalk.Disabled = false end end)
Local Scripts don't work in the Workspace. You'll have to put it under StarterPlayer > StarterPlayerScripts. Here's a modified version of your script
local plr = game.Players.LocalPlayer local name = plr.Name game.Workspace."PUT YOUR PART'S LOCATION HERE".Touched:Connect(function(hit) if hit.Parent.Name == name then plr.PlayerGui.ArmorShopOwner.Frame.TextLabel.NPCTalk.Disabled = false end end)
Please accept as an answer if it works :) If you have any trouble just leave a comment and I'll do my best to further help.