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!
if player interact to proxPrompt it will give the user a free model asset id -
What is the issue? Include screenshots / videos if possible!
script doesnt work:
local Players = game:GetService("Players")
local ProximityPromptService = game:GetService("ProximityPromptService")
local function giveAssetId(player, assetId)
if player then
print("Giving asset ID " .. assetId .. " to player " .. player.Name)
else
print("Player not found")
end
end
ProximityPromptService.PromptTriggered:Connect(function(promptObject, player)
if player then
local assetId = promptObject.ObjectText
giveAssetId(player, assetId)
else
print("Player not found")
end
end)
local proximityPrompt = script.Parent
proximityPrompt.Triggered:Connect(function(player)
giveAssetId(player, "7683471215")
end)
-
What solutions have you tried so far?
changing the proxpromp instance to actual one