Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Proximity prompt triggered event not working?

Asked by 3 years ago
Edited 3 years ago

When I used the .Triggered event on a proximity prompt it sometimes worked and sometimes didn't. I tried different events and those worked, but not the .Triggered event.

local Talk=game:GetService("ReplicatedStorage"):WaitForChild("Talk")
local prompt=script.Parent
prompt.Triggered:Connect(function(player)
print("Triggered")
    local TEXT=player.PlayerGui.ScreenGui.DialogueText.Textt
    local textlabel=player.PlayerGui.ScreenGui.DialogueText
    textlabel.Visible=true
    local Dialogue={"Hey there!",
        "This is my shop! Here I sell planes for gems and cash!",
        "I don't have every single plane here though.",
        "I am pretty big, but don't worry!",
        "That is how I made all of these planes!",
        "Click on the planes to buy them.",
        "Buy everything I have for something special!"}
    for i,text in pairs(Dialogue)  do
        TEXT.Value=text
        Talk:FireClient(player)
        wait(1.5)
    end
    textlabel.Visible=false
    end)

1 answer

Log in to vote
0
Answered by 2 years ago

Found it out myself just was some incorrectly positioned root part. I solved this a few months ago lol.

Ad

Answer this question