wait(1)
local Dummy = script.Parent.Parent.Parent
local sound = script.EatSound
local RemoveAppleEvent = game:GetService("ReplicatedStorage"):WaitForChild("RemoveApple")
local ToolName = "Apple"
local Dialog = script.Parent
RemoveAppleEvent.OnServerEvent:Connect(function(plr)
if plr.Backpack:FindFirstChild(ToolName) then
-- Find on backpack
local tool = plr.Backpack:FindFirstChild(ToolName)
tool:Destroy()
sound:Play()
Dialog.ResponseDialog = "thx"
elseif plr.Character:FindFirstChild(ToolName) then
-- Find on character
local tool = plr.Character:FindFirstChild(ToolName)
tool:Destroy()
sound:Play()
Dialog.ResponseDialog = "thx"
else
Dialog.ResponseDialog = "bruh u dont have an apple"
end
end)
I never touched dialogues. But maybe this video could help you if you do not want to touch scripting? Seems like it is just a bunch of Instances under the Dialog. https://www.youtube.com/watch?v=Cxqw8OgM7MU
Don’t know about Dialogs, it’s also a DialogChoice instance, they’re a niche instance not used often
If you’re using a Dialog intead of a DialogChoice, you selected the wrong one, ResponseDialog is not a property of a Dialog instance
Also you can do both cases in one line, so you don’t have to modify both cases, only keep them separate if you’re gonna have differences between them
local tool = plr.Backpack:FindFirstChild(ToolName) or plr.Character:FindFirstChild(ToolName)
if tool then
tool:Destroy()
sound:Play()
Dialog.ResponseDialog = "thx"
else
Dialog.ResponseDialog
end
i meant it was a dialogchoice and that choice gives the apple if chosen, and i want the response of that to be thx if we give it and something else if we dont give it, the something else is the default response