-
What do you want to achieve? I want to access the table’s properties
-
What is the issue? The table that I made has another tables inside it and I can’t acces them
-
What solutions have you tried so far? i’ve tried to look up posts at the developer hub but that didn’t help
Module:
local weaponModule = {
melee = {
Sword = {
animation = "rbxassetid://",
aimsound = "rbxassetid://9113453270"}},
handgun = {
M19 = {
animation = "rbxassetid://",
aimsound = "rbxassetid://12220779016"
}
}
}
return weaponModule
LocalScript:
local plr = game.players.LocalPlayer
local module = require(rep:WaitForChild("weaponModule"))
mouse.Button2Down:Connect(function()
for _, v in pairs(plr.Character:GetChildren()) do
if v:IsA("Tool") then
local Type = v:FindFirstChild("type").Value
local toolname = v.Name
local sound = Instance.new("Sound")
sound.Parent = v
sound.Looped = false
sound.SoundId = module.Type.toolsname.aimsound
sound:Play()
end
end
end)
thanks for viewing my problem!