hi I want to ask for your help, I Created a Morph character for my game but I, have a problem in why "Hitbox is not a valid member of Part “Workspace.Morph.1”??? so what is wrong with the Script and why Hitbox in Morph are not valid members of the Section??
game:GetService("ReplicatedStorage").MorphREM.MorphRmSAVE.OnClientEvent:Connect(function(MorphChr)
if workspace.Morph:WaitForChild(MorphChr) ~= nil then
workspace:FindFirstChild("Morph")[MorphChr].Transparency = 1
workspace:FindFirstChild("Morph")[MorphChr].Attachment.BuyCash.Enabled = false
workspace:FindFirstChild("Morph")[MorphChr].Hitbox.ProximityPrompt.Enabled = true
end
end)
local wsMorphs = workspace.Morph
game:GetService("ReplicatedStorage").MorphREM.MorphRmSAVE.OnClientEvent:Connect(function(MorphChr)
local thisMorph = wsMorphs:FindFirstChild(MorphChr) :: BasePart?
local thisMorphAttachment = thisMorph and thisMorph:FindFirstChild("Attachment")
local thisMorphBuyCashValue = thisMorphAttachment and thisMorphAttachment:FindFirstChild("BuyCash")
local thisMorphHitbox = thisMorph and (thisMorph:FindFirstChild("Hitbox") or thisMorph:FindFirstChild("hitbox"))
local thisMorphProx = thisMorphHitbox and thisMorphHitbox:FindFirstChildWhichIsA("ProximityPrompt")
if thisMorph then
thisMorph.Transparency = 1
if thisMorphBuyCashValue then
thisMorphBuyCashValue.Enabled = false
end
if thisMorphProx then
thisMorphProx.Enabled = true
end
end
end)