1—When the players are near of other player , then a gui will appears
like:
E) to stole
You can reply this topic about of Proximity Prompt or a Gui
You could add a proximity prompt the player’s character, like so:
local newPrompt = Instance.new("ProximityPrompt") -- your prompt
newPrompt.Parent = plr.Character.UpperTorso
Can you write the script about of stoling players item when they click to the proximity
And also is there any click detector script same as this algorithm?
You could use the .Triggered
event of the proximity prompt to do this, e.g
ProximityPrompt.Triggered:Connect(function()
-- steal stuff
end)
I’m afraid I don’t know what you mean by this, could you elaborate?
Also, check out these other resources
I mean can we add click detector to the players
like this
local clickadd = Instance.new("ClickDetector")
clickadd.parent = plr.character.uppertorso
same as your script
local players = game:GetService("Players")
players.PlayerAdded:Connect(function(player) -- connects to a function when a player joins, with a player variable
local proxPrompt = Instance.new("ProximityPrompt")
player.CharacterAdded:wait() -- waits for character to prevent "attempt to index nil with character" error
proxPrompt.Parent = player.Character:WaitForChild("HumanoidRootPart") -- parents the proxprompt instance to humanoidrootpart
end)
proxPrompt.Triggered:Connect(function()
-- do stuff here
end)
Whenever I do this, other players cannot see it.
Make sure its in a script, not a localscript.
There is a property of ProximityPrompt called “RequiresLineOfSight” try to disable that, then it will probably show.
Thanks man! This helped me out in the long run!