Hello, just wanted to know how do i fix this bug? Basically, i am trying to make a quest npc and it just does not work, heres what i did.
script.Parent.ProximityPrompt.Triggered:Connect(function(plr)
local chat = game:GetService(“Chat”)
chat:Chat(script.Parent.Parent.Head, "Your Current Quest is Catch The Ancients")
workspace["Ralsei Talking Sound"]:Play()
if plr.Backpack:FindFirstChild("The Ancients") == true then
chat:Chat(script.Parent.Parent.Head, "Quest Completed")
plr.Backpack["The Ancients"]:Destroy()
plr.leaderstats.Credits.Value += 5000
print("You Have The ancients")
else
chat:Chat(script.Parent.Parent.Head, "You dont have The Ancients in your Backpack")
end
end)
script.Parent.ProximityPrompt.Triggered:Connect(function(plr)
local chat = game:GetService(“Chat”)
chat:Chat(script.Parent.Parent.Head, "Your Current Quest is Catch The Ancients")
workspace["Ralsei Talking Sound"]:Play()
if plr.Backpack:FindFirstChild("The Ancients") == true then
chat:Chat(script.Parent.Parent.Head, "Quest Completed")
plr.Backpack["The Ancients"]:Destroy()
plr.leaderstats.Credits.Value += 5000
print("You Have The ancients")
else
chat:Chat(script.Parent.Parent.Head, "You dont have The Ancients in your Backpack")
end
end)
Bruh. just to let yall know, the script.Parent.ProximityPrompt.Triggered:Connect(function(plr)
local chat = game:GetService(“Chat”) is part of the script.