local npc1 = game.Workspace.NPCs:WaitForChild("npc1")
local messageGUI = game.Players.LocalPlayer.PlayerGui:WaitForChild("Message1")
local modules = game.ServerScriptService:WaitForChild("modules")
npc1.Hitbox1.ClickDetector.MouseClick:Connect(function()
if npc1.Hitbox1.ClickDetector.MaxActivationDistance == 32 then
messageGUI.Frame.Visible = true
messageGUI.Frame1.Visible = true
messageGUI.Frame1.TextLabel.Text = modules.npc1Messages.text1
end
end)
It seems to work perfectly in studio, but in game is another story. I've tried everything I know that could solve this, yet always end up in the same spot. What am I doing wrong?

1 comment
What script type is it