What do you want to achieve? Keep it simple and clear!
I want to create a UI that displays the properties of an instance when you press r on an instance.
What is the issue? Include screenshots / videos if possible!
I have no idea how to get the properties of an object.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve thought of accounting for every single property an instance can have but I have not tried it.
here’s my code so far
-- local script
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessedEvent)
if gameProcessedEvent then return end
if input.KeyCode == Enum.KeyCode.R then
local target = mouse.Target
-- stuck here
end
end)
Assuming you mean how to get each property in a table, from what I know you can’t do this in Roblox-lua. You could manually add each property yourself or you could make an HTTP request on developer.roblox.com through a proxy to try and grab the properties from there.
You can use HttpService which has functions for making GET, POST and other requests. Keep in mind that you can’t make any request to roblox.com or any of it’s subdomains so you’d have to use a proxy such as rprxy.xyz or something else.