Having issues getting a server script to clone an Integer Value to a player. Or does that have to be through a local script? Anyways here’s error that’s presently popping up.
local Tool = script.Parent
local Event = game:GetService("ReplicatedStorage").JailEvent
local Player = game.Players.LocalPlayer
local Crimes = {
["Murder"] = {200},
["Attempted Murder"] = {175},
["Tresspassing"] = {100},
["Reckless Driving"] = {85}
}
local BailList = {
["Murder"] = {500},
["Attempted Murder"] = {400},
["Tresspassing"] = {250},
["Reckless Driving"] = {200}
}
Event.OnServerEvent:connect(function(Player, ...)
local t = {...}
if t[1] == "Arrest" and not t[2]:FindFirstChild("Arrested1") then
local v = Instance.new("IntValue")
v.Parent = Player
v.Name = "Arrested1"
v.Value = 0
t[2].Arrested1.Value = table.find(Crimes.Murder) --It's breaking here
v.Parent = t[2]
wait(1)
v:remove()
elseif t[1] == "UnArrest" then
if t[2]:FindFirstChild("Arrested") then
t[2].Arrested1.Value = 0
end
end
end)