Trying to create a tool with proximity prompt, I tried all of codes and trick nothing worked

So there is an issue with tool. I tried to create a tool, and place it to server storage and I place its script to server script service. What about proximity prompt, I place it to the other part in the workspace. So when I click to E nothing happening. For many days I tried to fix this issue but no bugs and nothing have been found. This issue really annoyed me so much that I got massive pain in my brain. So I want someone’s help with this issue. The tool name is SnackTool and its script as you guess is SnackScript.


waaffffa

I don’t think LocalScripts work in ServerScriptService. I think you have to make it a Server Script for it to work.

I did it already, it didn’t worked.

Do this to get the player instead (Using a Server Script):

game.Players.PlayerAdded:Connect(function(plr)
- Prox Stuff Here
end

I think getting the player using game.Player.LocalPlayer only works in LocalScripts, so use this in a Server Script instead.

in local script it didn’t worked but in server script it’s start to work, but how can I do it for local script that multiple player could equip the tool?

Hmm. Let me see what I can do.

did you find something about it? I am researching but nothing.

Sorry, I was busy. Anyways, I’m pretty sure that multiple people will get the tool, because it fires every time a new player joins the game. If you want it in a LocalScript though, fire a remote event kind of like this:

-- Put this in a ServerScript

game.Players.PlayerAdded:Connect(function(plr)
    game.ReplicatedStorage.RemoteEvent:FireClient(plr) -- Change RemoteEvent to your name of the remote event.
end

-- Put the rest of this code in a LocalScript

game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function(plr)
    script.SnackTool:Clone().Parent = plr.Backpack -- Try putting the snack tool instead the LocalScript
end
2 Likes