I have the following script in a players "Events" that play localy depending on the players actions:
script:WaitForChild("Hide_Under_Bed").OnClientEvent:connect(function(BedObject)
if BedObject then
print(BedObject.Focus.Position) --Print an object's position in that model.
else
print("Y you do dis")
end
end)
And also this script in the object:
script.Parent.MouseClick:connect(function(player)
repeat wait() until player.Character
player.Character:WaitForChild("Events"):WaitForChild("Main"):WaitForChild("Hide_Under_Bed"):FireClient(script.Parent.Parent)
end)
Here I want to pass the object value to the player's event as a parametrer so I don't have to write "game.Workspace...". I would do it, but I have multiple of these with the same name so roblox would not know which one is the correct one.
I don't know if that even is possible or not. If it is it would be nice to give me some guidance here on how to pass it correctly without getting the "attempting to index.." error, if not any idea on how to get the object I want with the same name as many others.
If confused let's say I have 10 Models called "Table" in workspace. But I want to get a ESPECIFIC table from those 10 without calling it's name because roblox would not know which one it is. That's basically it

4 comments
no1 knows for real
Is this a troll account? It better be
my account is: nextgenplatform, please help me on my post because i got some scripting problems too
make variables like.. local Events = player.Charcater:WaitForChild('Events')