Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

ServerScriptService is not a valid member of DataModel. What am I doing wrong?

Asked by
Exadide 15
4 years ago

I'm getting this error. What am I doing wrong?

20:59:14 -- ServerScriptService is not a valid member of DataModel
  Stack Begin
  Script 'Players.Exadide.Backpack.Handucuffs.Handcuffs', Line 5
Stack End|

The line in error is

local databaseModule = require(game.ServerScriptService.DatabaseModule)
0
Use game:GetService("service name here"). Because sometime, some services maybe not loaded. https://developer.roblox.com/api-reference/function/ServiceProvider/GetService Block_manvn 395 — 4y
0
Should it be local databaseModule = game:GetService("ServerScriptService").DatabaseModule ? Exadide 15 — 4y
0
You do it right :D Block_manvn 395 — 4y
0
Oh wait, if you try to require the module, wrap the link like this: local databaseModule = require(game:GetService("ServerScriptService").DatabaseModule) Block_manvn 395 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

You should do

local databaseModule = require(game:GetService('ServerScriptService').DatabaseModule)

since it's a require

Ad

Answer this question