Hey there! I’m trying to make a game, and I am trying to spread the different areas apart. For the plushie dispensers, I use a proximity prompt. These proximity prompts work at the spawn area, but do not work for the area just a little bit farther away from spawn, but when I use “Play Here” via studio, it works.
Here’s the code that doesn’t work.
script.Parent.Triggered:Connect(function(player)
local tool = game.ReplicatedStorage.MetalNoob
local backpack = player:FindFirstChild(“Backpack”)
if backpack then
tool:Clone().Parent = backpack
tool.Value.Value = math.random(4000, 6900)
end
end)
Here’s the one that does work
script.Parent.Triggered:Connect(function(player)
local tool = game.ReplicatedStorage.ProNoob
local backpack = player:FindFirstChild("Backpack")
if backpack then
tool:Clone().Parent = backpack
tool.Value.Value = math.random(5000,10000)
end
end)
as you can see, it is almost the same script. What can cause this? I suspect it is that the proximity prompt isn’t loaded in the server yet.
here’s a short video