#The SkillTreeModule[v.Parent.Name] doesn't exist
84 messages · Page 1 of 1 (latest)
Show your replicated storage
for the inside
local SkillTreeModule =
{
["Health Upgrade 1"] =
{
Name = "Muscle",
Description = "You gained a muscle, now you are a muscular person. Congratulations. [Gives +25 Health.]",
Requirement = 1
},
["Health Upgrade 2"] =
{
Name = "Tank",
Description = "You are so strong that you become a Tank! Nice!! [Gives +75 Health.]",
Requirement = 5
},
["Health Upgrade 3"] =
{
Name = "Beast",
Description = "You are.. a Beast?!? Dang! You made the whole Common Enemy scared of you! [Gives +100 Health.]",
Requirement = 10
},
}
return SkillTreeModule
here for the open localscript
and here the script of the script.
local moduleLibrary = game:GetService("ReplicatedStorage"):WaitForChild("ModuleLibrary")
local SkillTreeModule = require(moduleLibrary:WaitForChild("SkillTreeModule"))
for i, v in pairs(script.Parent:GetDescendants()) do
local rps = game:GetService("ReplicatedStorage")
local folder = rps:WaitForChild("Events")
if v:IsA("ClickDetector") then
v.MouseClick:Connect(function(player)
local fire = folder:WaitForChild("SkillTree")
fire:FireClient(player, "ChangeCanPerspective", v.Parent.Name)
if SkillTreeModule[v.Parent.Name] then
print(SkillTreeModule[v.Parent.Name])
elseif not SkillTreeModule[v.Parent.Name] then
print("Does not exist.")
end
end)
end
end
(if you cannot see it clearly)
soo..
you had any solution or anything to solve it?
If you are doing a YouTube tutorial, can't just follow the step from the video? Then there will be no erorrs
Show us "Events" folder
So, the error is caused because the script is waiting for child "TalkEvent" in replicated storage and its waiting forever. You don't have "TalkEvent" in ReplicatedStorage
no, not that, that thing is not important anymore, its just, I'm lazy to delete it
k wait
I did follow tbh
I mean
like
Im following the steps
and it got error
or something not work
so yeha
yeha
yeah
@avgg
@uneven stump
So... What's the problem then?
** You are now Level 6! **
the problem is that, it doesn't exist.
so basically, if the SkillTreeModule[v.Parent.Name] doesnt not exist then it prints out "Doesn't Exist."
Send a screenshot with the error and the script
theres no error in it, it just prints it does not exist.
so it make me confused with it.
here the script tho
local moduleLibrary = game:GetService("ReplicatedStorage"):WaitForChild("ModuleLibrary")
local SkillTreeModule = require(moduleLibrary:WaitForChild("SkillTreeModule"))
for i, v in pairs(script.Parent:GetDescendants()) do
local rps = game:GetService("ReplicatedStorage")
local folder = rps:WaitForChild("Events")
if v:IsA("ClickDetector") then
v.MouseClick:Connect(function(player)
local fire = folder:WaitForChild("SkillTree")
fire:FireClient(player, "ChangeCanPerspective", v.Parent.Name)
if SkillTreeModule[v.Parent.Name] then
print(SkillTreeModule[v.Parent.Name])
elseif not SkillTreeModule[v.Parent.Name] then
print("Does not exist.")
end
end)
end
end
and here is the script of the script that I just send
Show SkillTreeModule module script too
ok
here
local SkillTreeModule =
{
["Health Upgrade 1"] =
{
Name = "Muscle",
Description = "You gained a muscle, now you are a muscular person. Congratulations. [Gives +25 Health.]",
Requirement = 1
},
["Health Upgrade 2"] =
{
Name = "Tank",
Description = "You are so strong that you become a Tank! Nice!! [Gives +75 Health.]",
Requirement = 5
},
["Health Upgrade 3"] =
{
Name = "Beast",
Description = "You are.. a Beast?!? Dang! You made the whole Common Enemy scared of you! [Gives +100 Health.]",
Requirement = 10
},
}
return SkillTreeModule
if SkillTreeModule[v.Parent.Name] then
print(SkillTreeModule[v.Parent.Name])
elseif not SkillTreeModule[v.Parent.Name] then
print("Does not exist.")
end
Do a v.Parent.Name before this part of the script
That's the problem... Your v.Parent.Name is one of these and in module script you don't have them in the table
so, how to fix this?
oh
how to make them into the table?
I think you want to get the Upgrade3, right?
if SkillTreeModule["Health",v.Parent.Name] then
hmm
then
local upgrade = "Health," v.Parent.Name
if SkillTreeModule[upgrade] then
** You are now Level 6! **
ok
its fine
im a idiot too
bruh
instead of printing, it make the tween not go work
;-;
so, basically, print and the tween don't work.
Don't print the tween
no I mean
this
fire.OnClientEvent:Connect(function(kamunanya, skill)
if kamunanya == "ChangeCanPerspective" then
local skillPart = Main:FindFirstChild(skill)
local tween = tweenService:Create(
cam,
TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out),
{CFrame = skillPart.CFrame * CFrame.new(0,20,0) * CFrame.Angles(math.rad(-90),0,0)}
)
tween:Play()
end
end)
Well, this will just move the camera (or a part idk) around
well it is, but instead, it also don't work too, lol
Man... Just learn scripting and don't use YouTube tutorials, at this rate you will not learn and you will not be able to evolve, to create your own things
oh ok.
well I guess