#when i triggered the proximityprompt it didnt work it used to work until just now

25 messages · Page 1 of 1 (latest)

oblique scaffold
#
local storage = game:GetService("ReplicatedStorage")

local NotifierEvent = storage.Events:FindFirstChild("NotifyReputation")

local Part = storage.Cloned:WaitForChild("GiveWarm")

local Furnace = workspace.Map.Survival["Furnace"]
local Effects = Furnace.Effects
local LogFolder = Furnace.Logs

local Count = Furnace.LogCount
local Subtract = Furnace.CanSubtract
local Prompt = Furnace.ProximityPart:FindFirstChild("WoodPrompt")

local function SpawnPart()
    local clone = Part:Clone()
    clone.Parent = workspace.Map.WarmZone
    task.wait(1)
    clone:Destroy()
end

Prompt.Triggered:Connect(function(Player)
    local leaderstats = Player:FindFirstChild("leaderstats")
    local Log = Player.Character:FindFirstChild("Log")

    if Log then
        if Count.Value >= 0 and Count.Value <= 3 then
            leaderstats.Reputation.Value = leaderstats.Reputation.Value + 50
            Prompt.MaxActivationDistance = 0
            NotifierEvent:FireClient(Player)
            Count.Value = Count.Value + 1
            Subtract.Value = false
            Log:Destroy()
            SpawnPart()
            task.wait(1.5)
            SpawnPart()
        else
            Count.Value -= 0
        end
    end
end)


while task.wait(60) do
    if Count.Value >= 1 then
        Count.Value -= 1
    else
        Count.Value -= 0
    end
end
azure patio
#

whats bad

oblique scaffold
#

i activate the proximityprompt

#

not work

#

no error

azure patio
#

do prints

oblique scaffold
#

i did

azure patio
#

of what

oblique scaffold
#

it prints out nothing

#

bug

azure patio
#

huh?

oblique scaffold
#

the script suppose to work

#

but it doesnt work when i activate

#

or triggered

azure patio
#

just debug with prints everywhere, and make sure the prompt is obviusly a prompt, either would give an error

oblique scaffold
#
game.Workspace.Map.Survival.Furnace.ProximityPart.WoodPrompt.Triggered:Connect(function(plyer)
    print("Player")
end)
``` it prints out nothing and the Woodprompt is just a proximityprompt
#

it might be the proximityprompt

azure patio
#

where is this script and what context of script it is

oblique scaffold
#

i use serverscript for this

#

and its on the serverscriptservice

#

e

#

its suppose to add a value

#

and the log tool from the player will get destroyed

#

and fires a remoteevent

oblique scaffold
#

help