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

Script is not running. But before they where working before. Why is it not working?

So I am trying to make a game and I have a script in Server Script Service but it for some reason does not run. It was working a day ago but when I went back on it didn't work and I don't know why. Here is the code.

local InventoryHandler = require(game.ReplicatedFirst.InvSystem)
local ItemsHandler = require(game.ReplicatedFirst.ItemHandler)
local EquipHandler = require(game.ReplicatedFirst.EquipSystem)
local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
	--Stats/Multiplyers==========================
	local Stats = Instance.new("Folder")
	Stats.Parent = player
	Stats.Name = "Stats"
	local physical = Instance.new("IntValue")
	physical.Parent = player.Stats
	physical.Name = "Physical"
	local Durability = Instance.new("IntValue")
	Durability.Parent  = player.Stats
	Durability.Name = "Durability"
	local Spell = Instance.new("IntValue")
	Spell.Parent  = player.Stats
	Spell.Name = "SpellPower"
	local Speed = Instance.new("IntValue")
	Speed.Parent  = player.Stats
	Speed.Name = "Speed"
	local PhysMulti = Instance.new("IntValue")
	PhysMulti.Parent = player.Stats
	PhysMulti.Name = "PhysMulti"
	local DurMulti = Instance.new("IntValue")
	DurMulti.Parent = player.Stats
	DurMulti.Name = "DurMulti"
	local SpellMulti = Instance.new("IntValue")
	SpellMulti.Parent = player.Stats
	SpellMulti.Name = "SpellMulti"
	local SpeedMulti = Instance.new("IntValue")
	SpeedMulti.Parent = player.Stats
	SpeedMulti.Name = "SpeedMulti"
	local Gold = Instance.new("IntValue")
	Gold.Parent = player.Stats
	Gold.Name = "Gold"
	--====================================
	--Level/Exp===============================
	local LevelStuff = Instance.new("Folder")
	LevelStuff.Parent = player
	LevelStuff.Name = "LevelStuff"
	local Level = Instance.new("IntValue")
	Level.Parent = player.LevelStuff
	Level.Name = "Level"
	local Exp = Instance.new("IntValue")
	Exp.Parent = player.LevelStuff
	Exp.Name = "Exp"
	local ExpNeed = Instance.new("IntValue")
	ExpNeed.Parent = player.LevelStuff
	ExpNeed.Name = "ExpNeed"
	--=========================================
	--Inevntory/Equip==========================
	InventoryHandler:CreateInv(player)
	InventoryHandler:AddItem(player, ItemsHandler.getItem("WoodSword"))
	InventoryHandler:AddItem(player, ItemsHandler.getItem("BeginnerWand"))
	EquipHandler:CreateEquip(player)
	--=========================================
end)

Players.PlayerRemoving:Connect(function(player)
	InventoryHandler:DeleteInventory(player)
	EquipHandler:DeleteEquip(player)
end)

Edit: I never get any errors it just doesn't run

2 comments

0

Maybe you just disabled it?

0

I checked its not disabled

1 answer

So I tested it more it was actually the

local ItemsHandler = require(game.ReplicatedFirst.ItemHandler)
local EquipHandler = require(game.ReplicatedFirst.EquipSystem)

part But I need those two things and I don't know why they are making the scripts not work. I tried putting them in different scripts but they still do not work. also why does the inventory handler work but these don't.

2 comments

0

Are the itemshandler and the equiphandler actually spawning in?

0

I put it into replicated first so shouldn't it spawn in

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