What do you want to achieve?
I have this script here but it only works on one model, I wanna try and make it so I can duplicate the model and it will still work for both.
What solutions have you tried so far?
Trying to look after stuff with collection service, but I tried and it doesn’t work for me.
local proximity = workspace.InfoBox1.P1.ProximityPrompt
local PPP = game:GetService("ProximityPromptService")
proximity.Triggered:Connect(function()
local GUI = script.Parent:WaitForChild("InfoBoxGui")
GUI.Enabled = not GUI.Enabled
end)
local GUI = script.Parent:WaitForChild("InfoBoxGui")
GUI.TextButton.Activated:Connect(function()
GUI.Enabled = not GUI.Enabled
end)
– SERVER SCRIPT | Located inside part named InfoBox1
local proximity = script.Parent.ProximityPrompt
local PPP = game:GetService("ProximityPromptService")
proximity.Triggered:Connect(function(player)
local gui = player.PlayerGui.SampleGui
gui.Enabled = not gui.Enabled
end)