You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want to change the text value of a text label depending on the variable parsed through a remote.
What is the issue? Include screenshots / videos if possible!
attempt to index nil with ‘name’ when “Done!” button is pressed. I am not sure if the http get request will work, but I am sure that the server is working.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have tried many dev forum posts but to no avail.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("Username")
local function onLogIn(player, TikTokAT)
if not player.Character then
return
end
print(TikTokAT)
local newClone = game.ReplicatedStorage.UsernameGUI:Clone()
newClone.Parent.name.text = (TikTokAT)
local HttpService = game:GetService("HttpService")
local ACCOUNT = "http://[IP]:8000/"+(TikTokAT)
-- Make the request to our endpoint URL
local response = HttpService:GetAsync(ACCOUNT)
newClone.Parent.followers.text = (response)
newClone.Parent = player.Character.Head
end
-- Call "onCreatePart()" when the client fires the remote event
remoteEvent.OnServerEvent:Connect(onLogIn)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("Username")
local function onLogIn(player, TikTokAT)
if not player.Character then
return
end
print(TikTokAT)
local newClone = game.ReplicatedStorage.UsernameGUI:Clone()
newClone.Parent = player.Character.Head
newClone.Parent.name.text = (TikTokAT)
local HttpService = game:GetService("HttpService")
local ACCOUNT = "http://[IP]:8000/"+(TikTokAT)
-- Make the request to our endpoint URL
local response = HttpService:GetAsync(ACCOUNT)
newClone.Parent.followers.text = (response)
end
-- Call "onCreatePart()" when the client fires the remote event
remoteEvent.OnServerEvent:Connect(onLogIn)