#UNSOLVED: GuiPopup triggers server-side instead of local

1 messages · Page 1 of 1 (latest)

tribal geyser
#

Hello, i have a system for when i enter a dedicated area, a notification pops up, now for some reason if one player enters the popup appears for everyone, i'll send the portion of my script that holds this function.

#

for i, v in workspace.AreaNotifiers:GetChildren() do
if v:IsA("BasePart") then
v.Touched:Connect(function(hit)
if not hit.Parent:FindFirstChild("Humanoid") then return end
if debounce then return end
debounce = true

        areaName.Position = UDim2.fromScale(.5, -.1)
        areaName.Text = v.Name
        areaName.Visible = true

        timeLabel.Text = getFormattedTime() -- Set the time text
        timeLabel.Visible = true

        -- Fade in time text and stroke
        timeLabel.TextTransparency = 1
        if timeStroke then timeStroke.Transparency = 1 end -- Ensure the stroke exists

        local fadeInTimeText = tweenService:Create(timeLabel, info, {TextTransparency = 0})
        local fadeInTimeStroke = timeStroke and tweenService:Create(timeStroke, info, {Transparency = 0})

        tweenService:Create(areaName, info, {Position = UDim2.fromScale(.5, .08)}):Play()
        task.wait(0.5)

        description.TextTransparency = 1
        description.UIStroke.Transparency = 1

        tweenService:Create(description, info, {TextTransparency = 0}):Play()
        tweenService:Create(description.UIStroke, info, {Transparency = 0}):Play()
#

-- Play fade-in effect for time label
fadeInTimeText:Play()
if fadeInTimeStroke then fadeInTimeStroke:Play() end

        typeWriterEffect(description, v.Description.Value, .03)

        task.wait(5)

        -- Fade out effect
        local fadeOutTimeText = tweenService:Create(timeLabel, info, {TextTransparency = 1})
        local fadeOutTimeStroke = timeStroke and tweenService:Create(timeStroke, info, {Transparency = 1})

        tweenService:Create(areaName, info, {Position = UDim2.fromScale(.5, -.1)}):Play()
        tweenService:Create(description, info, {TextTransparency = 1}):Play()
        tweenService:Create(description.UIStroke, info, {Transparency = 1}):Play()

        -- Play fade-out effect for time label
        fadeOutTimeText:Play()
        if fadeOutTimeStroke then fadeOutTimeStroke:Play() end

        task.wait(2)
        timeLabel.Visible = false -- Hide the time label
        timeLabel.TextTransparency = 0 -- Reset transparency for next time
        if timeStroke then timeStroke.Transparency = 0 end

        debounce = false
    end)
end

end

#

Help appreciated

indigo nymph
tribal geyser
#

U made me think that was in my script 😂

indigo nymph
#

is this server script or localscript?

tribal geyser
#

Localscript in startergui

indigo nymph
indigo nymph
tribal geyser
#

Because its a ui trigger

indigo nymph
#

that's not-- nevermind. just add if hit.Parent==game.Players.LocalPlayer.Character then return end at the top like the humanoid one

tribal geyser
indigo nymph
tribal geyser
#

Yes

indigo nymph
#

i've seen localscripts sitting in root folder

#

😨

tribal geyser
#

Lmaoo

mint meteor
indigo nymph
tribal geyser
#

Ohh

tribal geyser
mint meteor
tribal geyser
#

Thank god i'm not a scripter

#

So what do i do

harsh hatchBOT
#

studio** You are now Level 45! **studio

tribal geyser
#

How do i fix it?/

indigo nymph
indigo nymph
tribal geyser
#

Wait so at what line

#

Ty btw

indigo nymph
#

wait that'll make it show for everyone except the local player, you want the opposite kek hit.Parent ~= game.Players.LocalPlayer.Character then return end

#

coz sometimes touch can trigger on one client for another player's character touching a part

#

depends a bit on the part you cut out

tribal geyser
#

for i, v in workspace.AreaNotifiers:GetChildren() do
if v:IsA("BasePart") then
v.Touched:Connect(function(hit)
if not hit.Parent:FindFirstChild("Humanoid") then return end
if debounce then return end
debounce = true

#

Is it in that space

tribal geyser
#

Where do i put that

indigo nymph
indigo nymph
#

humanoiud verify gate: if not hit.Parent:FindFirstChild("Humanoid") then return end

tribal geyser
#

And replace that with your line

indigo nymph
#

i saying make another one that verify-gate's the localplayer's character

indigo nymph
tribal geyser
#

So should i just add your line after that

indigo nymph
#

i mean

#

if you wanted to hire somebody

#

then you should maybe offer fair pay

#

but if you didn't want to hire somebody

#

then maybe dont phrase every question as a "should i", because i might just answer yes to every single one just to mess with you hehe

#

replace "i" with "any fair person reading this thread" and same same nothing change? 🤷

tribal geyser
#

Okay well i just came here to try and fix a bug, i'm no scripter

indigo nymph
tribal geyser
#

Sure, were you reccomending me to put this line:
hit.Parent ~= game.Players.LocalPlayer.Character then return end
After this one?:
if not hit.Parent:FindFirstChild("Humanoid") then return end

indigo nymph
tribal geyser
#

It didn't work, all i want to change is it to trigger only for the local player who touched it, somewhere there is a problem of it triggering for everybody, that i have no clue how to fix

indigo nymph
tribal geyser
#

?

indigo nymph
tribal geyser
#

This isn't a hiring post, i'm simply asking for some scripting assistance by fixing a bug

indigo nymph
#

i decided to pay for it brb calling them now and simply sorting this out

tribal geyser
#

What are you talking about?

indigo nymph
# tribal geyser What are you talking about?

i'm talking about how i paid for someone to clean my toilet and it's all sorted now, and you refuse to pay for someone to clean your local popup thing and it is not sorted yet now 🤷 idk if i'm talking bakkagammons but i have belief in you'll pull through and make a game out of yourself salute i belief in you!

tribal geyser
#

Not a hiring post, if you want to keep inserting yourself into threads asking for money go to #💵︱hiring

#

UNSOLVED: GuiPopup triggers server-side instead of local

indigo nymph