[SOLVED] I need help making a profile system

Hey, so I need help making a profile system. For example whenever someone holds E on a player that they walk up to, it opens a Frame with the players username. I’ve been struggling on this for about 2 weeks so I’ve decided to ask help here. I don’t really have a script so I might try and make one along the way. (It’s 2am as I am posting this so I’m sorry if it takes me a long time to respond)

3 Likes

What I would do is add a ProximityPrompt to everyone that joins with the Child of a Folder that contains all of the information that you want to show up, then in the client I would disable the ProximityPrompt for the player that joined for themselves only, and then I would detect when the proximity prompt was triggered and enable a frame while referencing all of the information in the folder I previously stated. Tell me if this helped! Btw the folder would be full of StringValues or something that contain the player’s information, which you would set when the player joins.

Hey, so what would I do with the gui? Do I keep it in StarterGui or do I clone it inside a player or something. And here’s what I currently have in ServerScriptStorage:

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
	local ProximityPrompt = Instance.new("ProximityPrompt")
	
	player.CharacterAdded:Wait()
	
	ProximityPrompt.Parent = player.Character:WaitForChild("HumanoidRootPart")
end)

Keep the gui in playergui and just set the Enabled property on it to true, and for your server script, id suggest cloning a proximity prompt instead so it would have the script in it, and also make the folder with the info. Don’t remember in StarterPlayerScripts to add a script that waits for the proximity prompt to be created and then deletes it on the client.

Ah alright, what type of script would I need in the proximity prompt? (I started scripting about a few months ago so I’m fairly new)

A server script, because a local script wouldn’t run in the workspace (where the characters are held)

Would any of this interfere with the rating system that I am trying to add to the profile? Since I’m basically making like a profile rating system so just double checking

It shouldn’t, no

adfasdfsdfsdfd

If you’re gonna try to do advanced stuff with this, at least know the basics like how a proximity prompt works and what type of script you should use in a certain situation.

I just re read your first post and it makes sense now, it’s just really late so I kind of got confused but I got it now. I’ll let you know how it goes tomorrow :slight_smile:

Alright cool, have fun.

sdflsdflksfdklfd

1 Like

I have a cuff system that uses a proximity type thing , not necessarily proximity prompts but my own proximity system. If you want it I can hand it to you free of charge and maybe you can look around it and see if you can make something out of it

--SERVER

local Game = game
local Players = Game:GetService("Players")
local ReplicatedStorage = Game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage.RemoteEvent

local function OnPlayerAdded(Player)
	local function OnProximityPromptTriggered(_Player)
		print(_Player.Name.." triggered "..Player.Name.."'s proximity prompt.")
		RemoteEvent:FireClient(_Player, Player) --Client that triggered the prompt is fired and passed a reference to the prompt's owner.
	end

	local function OnCharacterAdded(Character)		
		local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart") or Character:WaitForChild("HumanoidRootPart")
		local ProximityPrompt = Instance.new("ProximityPrompt")
		ProximityPrompt.RequiresLineOfSight = false --Prevents the character from obstructing the prompt.
		ProximityPrompt.Triggered:Connect(OnProximityPromptTriggered)
		ProximityPrompt.Parent = HumanoidRootPart
		
		RemoteEvent:FireClient(Player) --Client is fired so that they can disable their own proximity prompt locally.
	end

	Player.CharacterAdded:Connect(OnCharacterAdded)
end

Players.PlayerAdded:Connect(OnPlayerAdded)
--CLIENT

local Game = game
local Players = Game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart") or Character:WaitForChild("HumanoidRootPart")
local ReplicatedStorage = Game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage:FindFirstChild("RemoteEvent") or ReplicatedStorage:WaitForChild("RemoteEvent")

local function OnRemoteEventFired(Player)
	if Player then
		local PlayerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui")
		if not PlayerGui then return end
		--Here's where you'd parent a gui to the local player's 'PlayerGui' container.
		--'Player' can be used to display information about the player whose prompt was triggered.
	else
		local ProximityPrompt = HumanoidRootPart:FindFirstChildOfClass("ProximityPrompt") or HumanoidRootPart:WaitForChild("ProximityPrompt")
		ProximityPrompt.Enabled = false
	end
end

RemoteEvent.OnClientEvent:Connect(OnRemoteEventFired)
1 Like

Hi! Tysm for sending that and for letting me know what some of those functions do with the double dashes

Would I use ServerScriptService for the 1st and and StarterPlayerScripts for the 2nd one? Or did I get that incorrect

And 1 more question, does the P in player and _player need to be in caps? (I’m writing the script cause I don’t really like copy and pasting so ye)

Those would be the correct containers for both scripts, yes. The capitalisation of variable names is optional.

Also a ‘RemoteEvent’ object needs to be placed inside the ‘ReplicatedStorage’ container.

1 Like
local PlayerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui")
if not PlayerGui then return end
local ScreenGui = Instance.new("ScreenGui")
local TextLabel = Instance.new("TextLabel")
TextLabel.Size = UDim2.new(1, 0, 1, 0)
TextLabel.Text = Player.Name
TextLabel.TextSize = 100
TextLabel.Parent = ScreenGui
ScreenGui.Parent = PlayerGui

I used the above snippet of code to display the triggered prompt’s player’s name on the triggering player’s screen.

1 Like

Ohhh nevermind I see why it wasn’t working, I had a typo in HumanoidRootPart. Thanks so much for the help! :smiley: Everything works now and it displays the players name, and in the meantime I learnt a bit more about RemoteEvents so yeah. Have good day!