DialoguePrompt is not a valid member of ProximityPrompt "Workspace.Dummy2.DialoguePrompt.ProximityPrompt"

Hello guys while i was developing my game a error ocurred when i was testing it out, can you guys help me ? (I will provide screenshots.)


Ekran görüntüsü 2024-04-12 140508

More information. The script would be cool but if it’s private then:
What’s DialoguePromt?(what kind of instance)

1 Like

It is the prompt that when player triggers it 2 cameras will be activating and there will be a on-going dialogue text.

1 Like

.Triggered is RBXScriptSignal so I think you should use

Promt.Triggered:Connect(function()

end)

Edit:
Are you deleting or cloning this instance in scripts or not?

1 Like

No, it will break the code’s system, you dont understand the issue clearly, do you want screenshot of more script?

1 Like

Yes, it would help greatly. Why Prompt in other Prompt. Like different keys?

1 Like

The full script is this

Edit: there is more but there are locals and main core scripts for the dialogue system to work.

1 Like

Also, pls screenshot how they’re parented(How they look on explorer). I think I got it

1 Like

Note: BirthdayCakeHandler leads up to another function, Not releated to this situation.

Ekran görüntüsü 2024-04-12 142553
Ekran görüntüsü 2024-04-12 142530
Ekran görüntüsü 2024-04-12 142515

1 Like

Seems like the client hasn’t had time to load the prompt. Try using Dummy2:WaitForChild("DialoguePrompt"):WaitForChild("ProximityPrompt")

(you also can’t use an if statement on a RBXScriptSignal)

1 Like

Maybe.
Also I recommend you to change from localscript to script(because it localscript can’t work on workspace from what I heard of)
Use this:

Dummy.DialoguePrompt.ProximityPrompt.Triggered:Connect(function()
      
end)
1 Like

But even then it wouldn’t be erroring if it didn’t run at all. LocalScripts will run if they are a descendant of a character, which I’m pretty sure a rig falls under that class.

Could try a Script with the RunContext set to client, though.

1 Like

It worked but, after the clocktime > 13 the other proximity prompt is not showing up and there are no errors in output

1 Like

Can you send the new script? I can’t really compare with the old one, there’s quite a bit wrong with it as well.

Also, please send it as code instead of an image.

1 Like

The whole script is this.

local Border1 = script.Parent.Dialog.Border0
local Plr = game.Players.LocalPlayer
local Border2 = script.Parent.Dialog.Border1
local Dummy2 = game.Workspace.Dummy2:WaitForChild(“DialoguePrompt”):WaitForChild(“ProximityPrompt”)
local ProximityPrompt = game.Workspace.Dummy3:WaitForChild(“DialoguePrompt”):WaitForChild(“ProximityPrompt”)
local Dialouge = script.Parent.Dialog.DialogText
local Text = script.Parent.Dialog.DialogText
local Camera = workspace.CurrentCamera
local objectiveText = “Go to party”
local BirthdayCake = game.Workspace:WaitForChild(“BirthdayCake”)
local player = game.Players.LocalPlayer
local lighting = game:GetService(“Lighting”)
local Views = workspace:WaitForChild(“Cams3”)
local tweenService = game:GetService(“TweenService”)
function tweenCamera(pos,tweenTime)
tweenService:Create(Camera,TweenInfo.new(0.75,Enum.EasingStyle.Cubic), {CFrame = pos.CFrame}):Play()
end

ProximityPrompt.Enabled = false

local FovCutscene = tweenService:Create(Camera, TweenInfo.new(0.75), {FieldOfView = 50})

local FovCutsceneRedo = tweenService:Create(Camera, TweenInfo.new(0.75), {FieldOfView = 70})

local function typing(Dialouge, text)
for i = 1,text do
Dialouge.Text = string.sub(text,1,i)
wait(0.055)
end
end

ProximityPrompt.Triggered:Connect(function()
ProximityPrompt.Enabled = true
repeat wait()
Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = Views.Cam1.CFrame
tweenCamera(Views.Cam2, 2)
FovCutscene:Play()
Border1.BackgroundTransparency = 0
Border2.BackgroundTransparency = 0
Text.TextTransparency = 0
typing(Dialouge, “Hello son, happy birthday! [Dad]”, 3, true, 0.05)
wait(2)
typing(Dialouge, “Happy birthday my dear, Your cake is ready [Mom]”, 3, true, 0.05)
wait(2)
typing(Dialouge, “Lets have a lovely party! [Family]”, 3, true, 0.05)
wait(2)
FovCutsceneRedo:Play()
Plr.PlayerGui.GoodEndingGui.Enabled = true
game.Workspace[“Can You Really Call This A Hotel”]:Stop()
game.Workspace.GoodEndMusic:Play()
Border1.BackgroundTransparency = 1
Border2.BackgroundTransparency = 1
Text.TextTransparency = 1
workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
end)

BirthdayCake.ClickDetector.MouseClick:Connect(function()
local function onClockTimeChanged()
local function celebrate()
script.Parent.Parent.ObjectiveGui.objective.Text = objectiveText
ProximityPrompt.Enabled = lighting.ClockTime > 13
if Dummy2:WaitForChild(“DialoguePrompt”):WaitForChild(“ProximityPrompt”) then
Dummy2.DialoguePrompt.ProximityPrompt.Triggered = false
script.Parent.Parent.ObjectiveGui.objective.TextTransparency = 1
ProximityPrompt.Enabled = false
end
end
local statement = “Player got the cake!”
if statement == “Player got the cake!” then
celebrate()
end
if ProximityPrompt.Triggered then
ProximityPrompt.Triggered:Connect(function()
ProximityPrompt:Destroy()
end)
end
end

  onClockTimeChanged()

  lighting:GetPropertyChangedSignal("ClockTime"):Connect(onClockTimeChanged)

end)

1 Like

I think this may just be down to the way roblox handles proximityprompts, but I’m not sure. Are the prompts close together? If they are, just change the key used for one of them.

1 Like

The script is should work like After the ClockTime > 13 Dummy3’s proximity Prompt Should be enabled but if the workspace BirthdayCake.ClickDetector is not clicked ProximityPrompt will not be enabled until the player activates the Dummy2’s ProximityPrompt and has Touched the cake

1 Like

why is Dummy2 set to a proximityprompt?

local Dummy2 = game.Workspace.Dummy2:WaitForChild("DialoguePrompt"):WaitForChild("ProximityPrompt")
local ProximityPrompt = game.Workspace.Dummy3:WaitForChild("DialoguePrompt"):WaitForChild("ProximityPrompt")
1 Like

because when player triggers it cams will be activating and a dialogue gui appears

1 Like

If dummy2 is a proximityprompt then, why are you doing this?
if Dummy2:WaitForChild("DialoguePrompt"):WaitForChild("ProximityPrompt") then