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

What is DataModel and why have i never had this?!???

I've tried to make a key door, but when I put my key in it says 14:00:44.192 - DoorOne is not a valid member of DataModel Here is what I did.

local function OnCardTouch(Hit)
	local KeyCheck = Hit:FindFirstChild("Key1")
	print("Checking...")
	if KeyCheck then
		print("Opening Door...")
		local ts = Transparency
		local cc = CanCollide
		local cd = game.DoorOne
		cd.Door.Transparency = 0.5
		cd.Door.CanCollide = false
		cd.DoorHandle.a.Transparency = 0.5
		cd.DoorHandle.a.cc = false
		cd.DoorHandle.s.ts = 0.5
		cd.DoorHandle.s.cc = false
		cd.Lock1.a.ts = 0.5
		cd.Lock1.a.cc = false
		cd.Lock1.s.cc = false
		cd.Lock1.s.ts = 0.5
		cd.Lock.a.ts = 0.5
		cd.Lock.a.cc = false
		cd.Lock.s.cc = false
		cd.Lock.s.ts = 0.5
		cd.Configurations_Setting.Text.SurfaceGui.TextLabel.Text = (" ")
		cd.Configurations_Setting.Text.ts = 0.5
		cd.Configurations_Setting.Text.cc = false
		cd.Configurations_Setting.Decal.Decal.ts = 1
		cd.Configurations_Setting.Decal.ts = 0.5
		cd.Configurations_Setting.Decal.cc = false
		cd.Configurations_Setting.a.ts = 0.5
		cd.Configurations_Setting.a.cc = false
		cd.Configurations_Setting.s.ts = 0.5
		wait(5) 
                --Closes the door
		cd.Door.Transparency = 0
		cd.Door.CanCollide = true
		cd.DoorHandle.a.Transparency = 0
		cd.DoorHandle.a.cc = true
		cd.DoorHandle.s.ts = 0
		cd.DoorHandle.s.cc = true
		cd.Lock1.a.ts = 0
		cd.Lock1.a.cc = true
		cd.Lock1.s.cc = true
		cd.Lock1.s.ts = 0
		cd.Lock.a.ts = 0
		cd.Lock.a.cc = true
		cd.Lock.s.cc = true
		cd.Lock.s.ts = 0
		cd.Configurations_Setting.Text.SurfaceGui.TextLabel.Text = ("Roblox's Lock (click to configure)")
		cd.Configurations_Setting.Text.ts = 0
		cd.Configurations_Setting.Text.cc = true
		cd.Configurations_Setting.Decal.Decal.ts = 0
		cd.Configurations_Setting.Decal.ts = 0
		cd.Configurations_Setting.Decal.cc = true
		cd.Configurations_Setting.a.ts = 0
		cd.Configurations_Setting.a.cc = true
		cd.Configurations_Setting.s.ts = 0
		cd.Configurations_Setting.s.cc = true
	end
end

script.Parent.Touched:connect(OnCardTouch) 

How do I fix this and what is DataModel?

1 comment

0

Oh, didn't know you could not make properties into variubles

1 answer

✓ Accepted answer

I assume you are trying to access DoorOne which is a child of the Workspace? You have:

local cd = game.DoorOne 

It should be: (if DoorOne is in the Workspace)

local cd = game.Workspace.DoorOne

As for what the Data Model is: ROBLOX DataModel

1 comment

0

oh lol such a silly mistake thanks

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