Following my previous post
I’m creating a tipping system in which staff can upload their own gamepasses as donation options.
I want to create a ProximityPrompt
to the player’s HumanoidRootPart
.
Server Script
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
if player:IsInGroup(GroupId) then
if player:GetRankInGroup(GroupId) >= RankRequirement then
local prompt = Instance.new("ProximityPrompt")
prompt.Parent = player.Character:FindFirstChild("HumanoidRootPart")
prompt.ActionText = "Tip"
prompt.HoldDuration = 1
end
end
end)
end)
This is a code snippet in which when a player joins it creates a ProximityPrompt
to the player’s HumanoidRootPart
.
My problem is that when I join the game, it doesn’t show any ProximityPrompts to any player.
I’ve also disabled it from been viewed by the Local Player with a localscript at StarterPlayerScript:
local Player = game:GetService("Players").LocalPlayer
Player.CharacterAdded:Connect(function(character)
local humanoid = character:WaitForChild("HumanoidRootPart")
local proximity = humanoid:WaitForChild("ProximityPrompt")
proximity.Enabled = false
end)