After a few hours I’m starting to fail from stress, here’s the script:
local P = game:GetService(“Players”)
local SS = game:GetService(“ServerStorage”)
P.PlayerAdded:Connect(function(player)
SS.ClonableFiles.CheckTool:Clone().Parent = player
player.CharacterAdded:connect(function(char)
SS.ClonableFiles.CharacterTools:Clone().Parent = char
end)
end)
–Get True parts
P.PlayerAdded:Connect(function(player)
player.CharacterAdded:connect(function(char)
char.CharacterTools.Test.Part0 = char.Head
end)
end)
–Check if true or false(module script)
wait(4)
local function check()
P.PlayerAdded:Connect(function(player)
player.CharacterAdded:connect(function(char)
while SS.Crasher.Value == true do
if char.CharacterTools.Test.Part0 == “Head” then
print(“sucess”)
else
print(“nil”)
end
wait()
end
end)
end)
end
check()
For some reason instead of printing “success” it will print “nil”, I don’t understand what I did wrong because the value of Part0 should be Head and is assuming as nil
Note: weldContrains is nil at the beginning but then in the scritt he puts Part0 as “Head”
What did I do wrong?