#Proximity Prompts arnt working.
1 messages · Page 1 of 1 (latest)
ok
how you do that
ah alr
also i just did this to see if it was something else effecting all prompts but it isnt. i also created a new game but they still dont work.
its the one in top left of keyboard
the
`
and after lua put the rest of code on new lines
local prompt = script.Parent.ProximityPrompt
prompt.Triggered:Connect(function()
print("triggered")
end)
thank
nope
let me see the explorer
but proximity prompts in all games i make dont work randomly but i go on a place sb else made and they work
ok
every other script is disabled except this one for it
even normal script wouldnt work
yea, local scripts cant run on the server
thank
mind if i run the main problem by you?
?
Im doing a building system and i got the part with the proximity and script to place but the prompt wont work
i can rec a video of problem if it would help
server
send script for the pot
local SmallEmptyPot = script.Parent
local Prompt = SmallEmptyPot:WaitForChild("ProximityPrompt")
local Pots = game.ReplicatedStorage.Furniture:WaitForChild("Pots")
local SmallSoiledPot = Pots:WaitForChild("Small Soiled Pot")
local Players = game:GetService("Players")
local function onPromptTriggered(player)
local character = player.Character
if not character then return end
local tool = player:FindFirstChildOfClass("Tool")
if not tool then return end
local typeValue = tool:FindFirstChild("Type")
local countValue = tool:FindFirstChild("Value")
if not typeValue or not countValue then return end
if typeValue.Value ~= "Soil" then return end
if countValue.Value < 1 then return end
local humanoid = character:FindFirstChildWhichIsA("Humanoid")
if humanoid then
humanoid.WalkSpeed = 0
humanoid.JumpPower = 0
end
Prompt:Destroy()
task.wait(4)
if humanoid then
humanoid.WalkSpeed = 16
humanoid.JumpPower = 50
end
local newPot = SmallSoiledPot:Clone()
if SmallEmptyPot.PrimaryPart and newPot.PrimaryPart then
newPot:SetPrimaryPartCFrame(SmallEmptyPot:GetPrimaryPartCFrame())
else
newPot:PivotTo(SmallEmptyPot:GetPivot())
end
local plotName = player.Name .. "Plot"
local plotFolder = workspace:FindFirstChild("Plots") and workspace.Plots:FindFirstChild(plotName)
local furnitureFolder = plotFolder and plotFolder:FindFirstChild("Furniture")
if furnitureFolder then
newPot.Parent = furnitureFolder
else
warn("Could not find Furniture folder for", player.Name)
newPot:Destroy()
return
end
countValue.Value -= 1
SmallEmptyPot:Destroy()
end
Prompt.Triggered:Connect(onPromptTriggered)
alr
dosnt print
yea
also the prompt only shows if you holding the correct tool its a script in the tool for that
I see the problem
then in that case just dont check for tool
remove those 2 lines
and test
still dosnt work sadly
what did you change
oh wait
yea you have to check the players backpack
oh
hm
I looked up that should be working
lemme think
revert to old script
the original you sent me
ok