Ad
Log in to vote
1

Why Isn't notification not sending a message?

Asked by 6 months ago
Edited by Xapelize 6 months ago

So I have gotten Into a problem where I am trying to have a notification pop up when It touched a part however the problem Is that It doesn't show let me break It down:

This Is the part: (Note: The part Is Inside of a model)

local part = script.Parent

local function findBot()
    game.StarterGui.findBot.Disabled = false
    wait(0.1)
    game.StarterGui.findBot.Disabled = true
end

part.Touched:Connect(findBot)



This Is the starterGUI local script:


local part = script.Parent local function findBot() game.StarterGui.findBot.Disabled = false wait(0.1) game.StarterGui.findBot.Disabled = true end part.Touched:Connect(findBot)

Hopefully this Is enough Information to get you started on nerfing It, thank you!

1 answer

Log in to vote
0
Answered by
Xapelize 2285 Moderation Voter Community Moderator
6 months ago

You should change PlayerGui not the StarterGui, for example:

game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui").findBot.Disabled = true

not

game.StarterGui.findBot.Disabled = true

Full script:

local part = script.Parent

local function findBot()
    game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui").findBot.Disabled = false
    wait(0.1)
    game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui").findBot.Disabled = true
end

part.Touched:Connect(findBot)
Ad

Answer this question