Hello! So I’ve been working on a game, and there is this part where the player has to interact with a button. The button uses a Proximity Prompt, and I programmed it so that when the player presses it, the Proximity Prompt will disable and an IntValue in the Replicated Storage will go up by 1.
It was supposed to do this, however, every time I interact with the Proximity Prompt, nothing happens. Also, it’s really weird because there is no error in the output telling me if something went wrong with the script.
I’ve tried doing simple debugging like making Prints throughout the script to see where the script stops. The script makes it through the Variable Part, however, the script just seems to stop when reaching the ProximityPrompt Trigger part. The Script is located in the Workspace, and its parent is the ProximityPrompt.
Just tried it,
Print(DBButtonclicks.value) to see what the number is in the output.
it works correctly (also make sure its a script not a local script, unless you just want the number to increase for the player)
it works fine for me.
heres what i added
local DBButtonClicks = game:GetService("ReplicatedStorage"):WaitForChild("Value") -- my value
script.Parent.Triggered:Connect(function()
script.Parent.Enabled = false
DBButtonClicks.Value += 1
print(DBButtonClicks.Value)
end)
Okay, thanks a lot. I’m pretty sure the scripts were not loading in because of lag in my game. I’m not sure exactly what was causing the problem though.