So I followed XxxLloyd061302xxX tutorial on how to make a Keybind Script for NPC, here's the link: https://www.youtube.com/watch?v=QYXCqa5knRk It's basically showing the Gui and change its position. Here's the script:
while wait() do script.Parent.Visible = false for i, v in pairs(game.Workspace.NPCs:GetChildren()) do local mag = (v.LowerTorso.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude if mag <= 10 then local WSP = game.Workspace.CurrentCamera:WorldToScreenPoint(v.LowerTorso.Position) script.Parent.Visible = true script.Parent.Position = UDim2.new(0,WSP.X,0,WSP.Y) script.Parent.TextLabel.Text = "to chat with "..v.Name end end end
But the output shows an error:
LowerTorso is not a part of Model. I basically followed him, make a folder in Workspace called NPCs and put the NPC in there and now it's showing that error. I couldn't figure out what is causing the error. My NPC is R15. Thanks!
Try replacing 'LowerTorso' with 'HumanoidRootPart'
game.Workspace.CurrentCamera:WorldToScreenPoint(v.HumanoidRootPart.Position)
Didn't know your'e following Tutorials, I thought you scripted it yourself.