Module Script keeps crashing? Thanks for the help.
Module Script (In workspace)
05 | game:GetService( "DataStoreService" ) |
06 | local SafeStore = game.ServerStorage:FindFirstChild( "PlayersData" ) |
07 | local mouse = game.Players.LocalPlayer:GetMouse() |
09 | DataSave.ItemTaken = function () |
10 | print (game.Players.LocalPlayer.Name) |
12 | local Player = game.Players.LocalPlayer |
14 | if mouse.Target ~ = nil then |
15 | if mouse.Target:findFirstChild( "CanPickUp" ) then |
16 | if mouse.Target:findFirstChild( "CanPickUp" ).Value = = true then |
17 | local Item = mouse.Target:findFirstChild( "CanPickUp" ).Parent |
18 | print (Item.Name .. " Is what your trying to pick up!" ) |
20 | local values = Player.Data.SlotHold:GetChildren() |
22 | if values [ i ] .ClassName = = "BoolValue" then |
23 | if values [ i ] .Value = = false then |
31 | Player.Data.SlotHold:findFirstChild(found.Name).Value = true |
32 | local CurrentSlot = Player.Data.SlotHold:findFirstChild(found.Slot.Value).Name |
33 | print (Player.Data.SlotHold:findFirstChild(found.Slot.Value).Name .. " Is line 31" ) |
34 | print (CurrentSlot.Name) |
35 | local SlotTemp = Player.Data.SlotHold:findFirstChild(CurrentSlot) |
36 | print (SlotTemp.Parent) |
37 | SlotTemp.ItemName.Value = (mouse.Target:findFirstChild( "CanPickUp" ).Parent.Name) |
41 | print ( "Invintory Full!" ) |
Error
1 | ServerStorage is not a caild member of DataModel |
2 | Script 'Workspace.DataSaveModule' , Line 6 |