Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Torso is not a valid member of DataModel?

trying to make a gui aka a (it) gui for the tag to appear over someones head when they first join aka who ever joins game first is it but im having a Torso is not a valid member of DataModel error and can't figure out why.



local rs = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local Tagger = false
local Gui = rs:WaitForChild("Gui") 


Players.PlayerAdded:Connect(function(plr)
if Tagger == false then
Tagger = true 
repeat
wait()
until plr.Character 
Gui.Parent = plr.Character
Gui.Adornee = plr.Character.Head
end
end)

local Players = game:GetService("Players")
local Gui = script.Parent
local GuiOwner = Gui.Parent

local Torso = GuiOwner.Torso
wait(.5)
Torso.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then 
if Players:FindFirstChild(hit.Parent.Name) then 
 local NewGui = Gui:Clone() 
 NewGui.Parent = hit.Parent
NewGui.Adornee = hit.Parent.Head 
Gui:Destroy() 
end
end
end)

1 comment

0

I'm pertty sure that you need to replace torso with HumanoidRootPart if you are using r15

1 answer

With R15, there is no "Torso" part. There is Upper Torso, and Lower Torso. As Zomba said, there's also HumanoidRootPart, which is normally in the middle of the two, but just replace Torso, with UpperTorso, LowerTorso, or HumanoidRootPart.

2 comments

0

accidentally pressed accept answer, but HumanoidRootPart is not a valid member of BillboardGui i feel like this isn't right

0

I never said HumanoidRootPart was a member of BillboardGui? I was just saying that Torso isn't a member of an R15 character.

This discussion is preserved as it was. New answers, comments, and votes are closed.