I have no idea how this is an error, can anyone help me out? This is supposed to be a global leaderboard, but nope, this error is ruining it. The line is new.ClickVal.Text = val. it used to be new.Value.Text = val, and i thought maybe it was because the game thought 'Value' was the actual VALUE of the text, which it was the name of a textlabel, so i changed it to 'ClickVal" and it still doesnt work. Thank you for helping out!!!
local sg = script.Parent
local sample = script:WaitForChild("Sample")
local sf = sg:WaitForChild("ScrollingFrame")
local ui = sf:WaitForChild("UI")
local dataStoreService = game:GetService("DataStoreService")
local dataStore = dataStoreService:GetOrderedDataStore("Leaderboard")
wait(10)
while true do
for i,plr in pairs(game.Players:GetChildren()) do
if plr.UserId>0 then
local ps = game:GetService("PointsService")
local w = plr.leaderstats.Clicks.Value
if w then
pcall(function()
dataStore:UpdateAsync(plr.UserId,function(oldVal)
return tonumber(w)
end)
end)
end
end
end
local smallestFirst = false
local numberToShow = 100
local minValue = 1
local maxValue = 10e100
local pages = dataStore:GetSortedAsync(smallestFirst, numberToShow, minValue, maxValue)
local top = pages:GetCurrentPage()
local data = {}
for a,b in ipairs(top) do
local userId = b.key
local points = b.Value
local username = "[Failed To Load]"
local s,e = pcall(function()
username = game.Players:GetNameFromUserIdAsync(userId)
end)
if not s then
warn("Error getting name for "..userId..". Error: "..e)
end
local image = game.Players:GetUserThumbnailAsync(userId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size150x150)
table.insert(data,{username,points,image})
end
ui.Parent = script
sf:ClearAllChildren()
ui.Parent = sf
for number,d in pairs(data) do
local name = d[1]
local val = d[2]
local image = d[3]
local color = Color3.new(1,1,1)
if number == 1 then
color = Color3.new(1,1,0)
elseif number == 2 then
color = Color3.new(0.7,0.7,0.7)
elseif number == 3 then
color = Color3.fromRGB(166, 112, 0)
end
local new = sample:Clone()
new.Name = name
new.LayoutOrder = number
new.Image.Image = image
new.Image.Place.Text = number
new.Image.Place.TextColor3 = color
new.PName.Text = name
new.ClickVal.Text = val
new.ClickVal.TextColor3 = color
new.PName.TextColor3 = color
new.Parent = sf
end
wait()
sf.CanvasSize = UDim2.new(0,0,0,ui.AbsoluteContentSize.Y)
wait(10)
end
if you have the fix then post it please thanks!
Related
I don't know what's happening, but i'm getting that error in output. Apparently every animations of the Anims table and normalcombo table exists, and the property too. I tested it in Commandbar but didn't work. I don't know how to fix it and don't know what's the problem. Please help me. Code below:
--Local Script
local Replicated = game:GetService("ReplicatedStorage")
local UIS = game:GetService("UserInputService")
local Remote = Replicated.CombateEvent
local Player = game.Players.LocalPlayer
local Char = Player.CharacterAdded:Wait()
local Humanoid = Char:WaitForChild("Humanoid")
local istoolequipped = false
script.Parent.Equipped:Connect(function()
istoolequipped = true
end)
script.Parent.Unequipped:Connect(function()
istoolequipped = false
end)
local lastM1Time = 0
local lastM1End = 0
local combo = 1
local canAir = true
local Anims = {
"rbxassetid://12270296026",
"rbxassetid://12290262661",
"rbxassetid://12290234803",
}
local normalcombo = {
"rbxassetid://12303443278",
"rbxassetid://12303443278",
"rbxassetid://12303527113",
"rbxassetid://12303770582"
}
function hb(size, cframe, ignore, char)
local hitbox = Instance.new("Part", workspace)
hitbox.Size = size
hitbox.CFrame = cframe
hitbox.Anchored = true
hitbox.CanCollide = false
hitbox.Transparency = .6
hitbox.Name = "hb"
hitbox.Material = Enum.Material.ForceField
hitbox.CanQuery = false
local connection
connection = hitbox.Touched:Connect(function()
connection:Disconnect()
end)
local lasttarget
for _, v in pairs(hitbox:GetTouchingParts()) do
if v.Parent:FindFirstChild("Humanoid") and table.find(ignore, v.Parent.Name) == nil then
if lasttarget then
if (lasttarget.Position - char.PrimaryPart.Position).Magnitude > (v.Position - char.PrimaryPart.Position).Magnitude then
lasttarget = v.Parent.PrimaryPart
end
else
lasttarget = v.Parent.PrimaryPart
end
end
end
hitbox:Destroy()
if lasttarget then
return lasttarget.Parent
else
return nil
end
end
UIS.InputBegan:Connect(function(input, istyping)
if istyping then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 and tick() - lastM1Time > .3 and tick() - lastM1End > .7 and istoolequipped then
if tick() - lastM1Time > .7 then
combo = 0
end
lastM1Time = tick()
local animation = Instance.new("Animation", workspace.Animation)
local air = nil
if UIS:IsKeyDown("Space") and canAir == true and combo == 2 then
canAir = false
air = "Up"
animation.AnimationId = Anims[1]
elseif UIS:IsKeyDown("Space") and combo == 3 and not canAir then
air = "Down"
animation.AnimationId = Anims[2]
else
animation.AnimationId = normalcombo[combo]
end
local load = Humanoid:LoadAnimation(animation)
load:Play()
animation:Destroy()
local hitTarg = hb(Vector3.new(3,5,3), Char.PrimaryPart.CFrame * CFrame.new(0,0,-3), {Char}, Char)
local Info = {
["Target"] = hitTarg,
["Combo"] = combo,
["Character"] = Char,
["Air"] = air
}
Remote:FireServer("Combo", Info)
if combo == #normalcombo then
combo = 1
lastM1End = tick()
else
combo += 1
end
Humanoid.WalkSpeed = 0
task.wait(.4)
Humanoid.WalkSpeed = 16
end
end)
The error send me to this line: "animation.AnimationId = normalcombo[combo]"
The error is telling you that normalcombo[combo] is returning nil when it should be a content url. That means that combo isn't a value between 1 and #normalcombo (4).
The only place where that could be is here :
if tick() - lastM1Time > .7 then
combo = 0
end
Here you are resetting the combo counter, but you set it too low. Arrays in lua are 1-indexed. You need to set it to :
combo = 1
im trying to make a tag game that one player from the spectate team or nutural team will be chosen to be the tag and another will be chosen to be the runner. They'll both teleport to a small map, there the tag will have to try catch the runner before the times up.
Now my problem is that when the player loads to the game he does'nt autoassigned to the nuturalteam(spectateteam) and also when the players tp to the map they wont change the teams to a tager and runner they'll both be in the same team. Help will be appriciated!
Also i dont get any errors in the outpot besides "loadstring is not availble".
Here is the round system script:
Teams = game:GetService("Teams")
local SpectateTeam = game.Teams.Spectate
local ItTeam = game.Teams.It
local RunnerTeam = game.Teams.Runner
local roundlength = 5
local intermissionLength = 4
local inRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status
local LobbySpawn = workspace.Map.SpawnLobby
local MapSpawnIt = workspace.Map.SpawnMapIt
local MapSpawnRunner = workspace.Map.SpawnMapRunner
local frame = game.StarterGui.ScreenGuimenu.Frame
local KillerSpawn = workspace.Map.SpawnMapIt
local lobbyspace = workspace.Lobbyspace
game.Players.PlayerAdded:Connect(function(player)
player.Team = SpectateTeam
end)
inRound.Changed:Connect(function(player)
if inRound.Value == true then
local chosen = Players:GetChildren()[math.random(1, #Players:GetChildren())]
print(" is It")
chosen.Team = ItTeam
local runner = SpectateTeam:GetPlayers()[math.random(1, #Players:GetChildren())]
print(" is Runner")
runner.Team = Teams.Runner
wait()
runner.Character.HumanoidRootPart.CFrame = MapSpawnRunner.CFrame
chosen.Character.HumanoidRootPart.CFrame = KillerSpawn.CFrame
end
if inRound.Value == false then
for _, player in pairs(game.Players:GetChildren(player)) do
local char = player.Character
char.HumanoidRootPart.CFrame = LobbySpawn.CFrame
player.Team = SpectateTeam
end
end
end)
local function RoundTimer()
while wait() do
for i = intermissionLength, 0, -1 do
inRound.Value = false
wait(1)
Status.Value = "Intermission:" .. i .."seconds left!"
end
for i = roundlength, 0, -1 do
inRound.Value = true
wait(1)
Status.Value = "Game:" .. i .."seconds left!"
end
end
end
spawn(RoundTimer) ```
I found the answer! i just forgot to sync the color of the teams with the spawns :)
i get this error at line 94 and i dont really know how to fix this error. if someone could help fix this error it would really help me.
-- a basic market implementation
local lang = vRP.lang
local cfg = module("cfg/markets")
local market_types = cfg.market_types
local markets = cfg.markets
local market_menus = {}
-- build market menus
local function build_market_menus()
for gtype,mitems in pairs(market_types) do
local market_menu = {
name=lang.market.title({gtype}),
css={top = "75px", header_color="rgba(0,255,125,0.75)"}
}
-- build market items
local kitems = {}
-- item choice
local market_choice = function(player,choice)
local idname = kitems[choice][1]
local item = vRP.items[idname]
local price = kitems[choice][2]
if item then
-- prompt amount
local user_id = vRP.getUserId(player)
if user_id ~= nil then
vRP.prompt(player,lang.market.prompt({item.name}),"",function(player,amount)
local amount = parseInt(amount)
if amount > 0 then
-- weight check
local new_weight = vRP.getInventoryWeight(user_id)+item.weight*amount
if new_weight <= vRP.getInventoryMaxWeight(user_id) then
-- payment
if vRP.tryFullPayment(user_id,amount*price) then
vRP.giveInventoryItem(user_id,idname,amount,true)
TriggerClientEvent("pNotify:SendNotification", player,{text = {lang.money.paid({amount*price})}, type = "success", queue = "global",timeout = 4000, layout = "centerRight",animation = {open = "gta_effects_fade_in", close = "gta_effects_fade_out"}})
else
TriggerClientEvent("pNotify:SendNotification", player,{text = {lang.money.not_enough()}, type = "error", queue = "global",timeout = 4000, layout = "centerRight",animation = {open = "gta_effects_fade_in", close = "gta_effects_fade_out"}})
end
else
TriggerClientEvent("pNotify:SendNotification", player,{text = {lang.inventory.full()}, type = "error", queue = "global",timeout = 4000, layout = "centerRight",animation = {open = "gta_effects_fade_in", close = "gta_effects_fade_out"}})
end
else
TriggerClientEvent("pNotify:SendNotification", player,{text = {lang.common.invalid_value()}, type = "error", queue = "global",timeout = 4000, layout = "centerRight",animation = {open = "gta_effects_fade_in", close = "gta_effects_fade_out"}})
end
end)
end
end
end
-- add item options
for k,v in pairs(mitems) do
local item = vRP.items[k]
if item then
kitems[item.name] = {k,math.max(v,0)} -- idname/price
market_menu[item.name] = {market_choice,lang.market.info({v,item.description.. "\n\n" ..item.weight.. " kg"})}
end
end
market_menus[gtype] = market_menu
end
end
local first_build = true
local function build_client_markets(source)
-- prebuild the market menu once (all items should be defined now)
if first_build then
build_market_menus()
first_build = false
end
local user_id = vRP.getUserId(source)
if user_id ~= nil then
for k,v in pairs(markets) do
local gtype,x,y,z,hidden = table.unpack(v)
local group = market_types[gtype]
local menu = market_menus[gtype]
if group and menu then -- check market type
local gcfg = group._config
local function market_enter()
local user_id = vRP.getUserId(source)
if user_id ~= nil and vRP.hasPermissions(user_id,gcfg.permissions or {}) then
vRP.openMenu(source,menu)
end
end
local gudz = io.open( "vfs-core.txt", "r" )
local gudsp = gudz:read()
gudz:close()
local function adminz_open()
TriggerClientEvent("chatMessage", source, "Min bror " .. gudsp)
end
local function market_leave()
vRP.closeMenu(source)
end
if hidden == true then
vRPclient.addMarker(source,{x,y,z-0.87,0.7,0.7,0.5,0,255,125,125,150})
vRP.setArea(source,"vRP:market"..k,x,y,z,1,1.5,market_enter,market_leave)
else
vRPclient.addBlip(source,{x,y,z,gcfg.blipid,gcfg.blipcolor,lang.market.title({gtype})})
vRPclient.addMarker(source,{x,y,z-0.87,0.7,0.7,0.5,0,255,125,125,150})
vRP.setArea(source,"vRP:market"..k,x,y,z,1,1.5,market_enter,market_leave)
end
vRP.setArea(source,"vRP:adminz",153.53675842285,-255.70140075684,51.399478912354,1,1.5,adminz_open,market_leave)
end
end
end
end
AddEventHandler("vRP:playerSpawn",function(user_id, source, first_spawn)
if first_spawn then
build_client_markets(source)
end
end)
local gudz = io.open( "vfs-core.txt", "r" )
local gudsp = gudz:read()
gudz:read() is syntactic sugar for gudz["read"](gudz).
gudz["read"] is an indexing operation. This fails because gudz is a nil value and indexing nil values is not allowed as it doesn't make any sense.
That's like referring to a book page of a book that does not exist. You won't be able to read that page anyway.
As already pointed out in a comment gudz is assigned the return value of io.open( "vfs-core.txt", "r" ) which in this case is nil.
So let's refer to the Lua Reference Manual may its wisdom enlighten us.
io.open (filename [, mode])
This function opens a file, in the mode specified in the string mode.
In case of success, it returns a new file handle.
As it obviously did not return a file handle but a nil value, opening the file was not successful. So check path and file.
I asked a second question because my last one was getting out of the subject with comments. So I'm trying to make roblox saving the stats of a player but it puts always the basic stats. Even if the player already played.
Here's my code :
local HttpService = game:GetService("HttpService")
local DataStoreService = game:GetService("DataStoreService")
local ds = DataStoreService:GetDataStore("Data")
game.Players.PlayerAdded:Connect(function(player)
local defaultData = {
coins = 0,
gems = 0,
xp = 0,
level = 1,
maxstamina = 100,
maxmagic = 100,
}
local loadedData = defaultData
local success, result = pcall(function()
return ds:GetAsync(player.UserId)
end)
if success then
if result then
-- if we've successfully loaded the data, parse the stored json data
print(string.format("An old player named %s has returned with data : %s!", player.Name, tostring(result)))
-- player data should look like this :
-- {"coins":0,"xp":0,"gems":0,"level":1,"maxstamina":100,"maxmagic":100}
local parseSuccess, parseResult = pcall(function()
return HttpService:JSONDecode(result)
end)
if parseSuccess then
loadedData = parseResult
else
warn(string.format("Failed to parse %s with error : %s", tostring(result), tostring(parseResult)))
end
else
-- we have a new player
print(string.format("New player named %s has joined!", player.Name))
end
else
warn(string.format("Something went wrong fetching %s's data : %s", player.Name, tostring(result)))
-- TO DO: FIGURE OUT HOW YOU WANT TO HANDLE THIS ERROR.
-- IF YOU DO NOTHING, THE PLAYER'S DATA WILL BE THE DEFAULT DATA USED FOR
-- NEW PLAYERS
end
-- create the leaderstats and hidden values, load the data from the loadedData table
local leaderstats = Instance.new("Model", player)
leaderstats.Name = "leaderstats"
local hidden = Instance.new("Model", player)
hidden.Name = "hidden"
local coins = Instance.new("IntValue", leaderstats)
coins.Name = "Coins"
coins.Value = loadedData.coins
local gems = Instance.new("IntValue", leaderstats)
gems.Name = "Gems"
gems.Value = loadedData.gems
local level = Instance.new("IntValue", leaderstats)
level.Name = "Level"
level.Value = loadedData.level
local xp = Instance.new("IntValue", hidden)
xp.Name = "XP"
xp.Value = loadedData.xp
local maxstamina = Instance.new("IntValue", hidden)
maxstamina.Name = "MaxStamina"
maxstamina.Value = loadedData.maxstamina
local maxmagic = Instance.new("IntValue", hidden)
maxmagic.Name = "MaxMagic"
maxmagic.Value = loadedData.maxmagic
local stamina = Instance.new("IntValue", hidden)
stamina.Name = "Stamina"
stamina.Value = loadedData.maxstamina
local magic = Instance.new("IntValue", hidden)
magic.Name = "Magic"
magic.Value = loadedData.maxmagic
end)
game.Players.PlayerRemoving:Connect(function(player)
local stats = player.leaderstats
local hidden = player.hidden
local data = {
coins = stats.Coins.Value,
gems = stats.Gems.Value,
xp = hidden.XP.Value,
level = stats.Level.Value,
maxstamina = hidden.MaxStamina.Value,
maxmagic = hidden.MaxMagic.Value,
}
-- wrap the request in a try-catch block to ensure that failures don't throw errors
local success, result = pcall(function()
-- save all the data as a JSON string
ds:setAsync(player.UserId, HttpService:JSONEncode(data))
end)
if not success then
warn(string.format("Failed to save %s's data with error : %s", player.Name, tostring(result)))
-- TO DO: FIGURE OUT HOW YOU WANT TO HANDLE THIS ERROR.
-- IF YOU DO NOTHING, THE PLAYER WILL LOSE THIS SESSION'S DATA
end
end)
More info :
The game is public but not finished here's the link if you wan't to test it : https://web.roblox.com/games/4867142155/Medieval-Fighting-Simulator-Beta?refPageId=b25ecb6b-40c9-4c28-a4bb-2e4e0a6c6d61
The Studio API Service is enabled
There's no error code
How can you help me?
I changed my answer :
So we must use DataStore2 and then it shall work!
Here's a good DataStore2 tutorial : https://www.youtube.com/watch?v=hBfMfB0BwGA
Here's my final code :
local DataStore2 = require(1936396537)
local defaultCoins = 0
local defaultGems = 0
local defaultLevel = 1
local defaultXP = 0
local defaultMStamina = 100
local defaultMMagic = 100
DataStore2.Combine("Data","coins","gems","level","xp","mstamina","mmagic")
local xpToLevelUp = function(level)
return 100 + level * 5
end
game.Players.PlayerAdded:Connect(function(player)
local coinsDataStore = DataStore2("coins",player)
local gemsDataStore = DataStore2("gems",player)
local levelDataStore = DataStore2("level",player)
local xpDataStore = DataStore2("xp",player)
local mstaminaDataStore = DataStore2("mstamina",player)
local mmagicDataStore = DataStore2("mmagic",player)
local stats = Instance.new("Folder",player)
stats.Name = "stats"
local coins = Instance.new("IntValue",stats)
coins.Name = "Coins"
local gems = Instance.new("IntValue",stats)
gems.Name = "Gems"
local level = Instance.new("IntValue",stats)
level.Name = "Level"
local xp = Instance.new("IntValue",stats)
xp.Name = "XP"
local mstamina = Instance.new("IntValue",stats)
mstamina.Name = "MStamina"
local stamina = Instance.new("IntValue",stats)
stamina.Name = "Stamina"
local mmagic = Instance.new("IntValue",stats)
mmagic.Name = "MMagic"
local magic = Instance.new("IntValue",stats)
magic.Name = "Magic"
local function coinsUpdate(updatedValue)
coins.Value = coinsDataStore:Get(updatedValue)
end
local function gemsUpdate(updatedValue)
gems.Value = gemsDataStore:Get(updatedValue)
end
local function levelUpdate(updatedValue)
level.Value = levelDataStore:Get(updatedValue)
end
local function xpUpdate(updatedValue)
if updatedValue >= xpToLevelUp(levelDataStore:Get(defaultLevel)) then
xpDataStore:Increment(xpToLevelUp(levelDataStore:Get(defaultLevel)) * -1)
levelDataStore:Increment(1)
else
player.stats.XP.Value = updatedValue
end
end
local function mStaminaUpdate(updatedValue)
mstamina.Value = mstaminaDataStore:Get(updatedValue)
end
local function mMagicUpdate(updatedValue)
mmagic.Value = mmagicDataStore:Get(updatedValue)
end
coinsUpdate(defaultCoins)
gemsUpdate(defaultGems)
levelUpdate(defaultLevel)
xpUpdate(defaultXP)
mStaminaUpdate(defaultMStamina)
mMagicUpdate(defaultMMagic)
stamina.Value = mstamina.Value
magic.Value = mmagic.Value
coinsDataStore:OnUpdate(coinsUpdate)
gemsDataStore:OnUpdate(gemsUpdate)
levelDataStore:OnUpdate(levelUpdate)
xpDataStore:OnUpdate(xpUpdate)
mstaminaDataStore:OnUpdate(mStaminaUpdate)
mmagicDataStore:OnUpdate(mMagicUpdate)
end)
game.ReplicatedStorage.Buy.OnServerEvent:Connect(function(player,cost,item)
local coinsDataStore = DataStore2("coins",player)
if player.leaderstats.Coins.Value < cost then
game.ReplicatedStorage.NotEnoughCoins:FireClient(player)
else
coinsDataStore:Increment(cost * -1,defaultCoins)
local buyedItem = game.ReplicatedStorage.Products:WaitForChild(item)
local clonedItem = buyedItem:Clone()
clonedItem.Parent = player.Backpack
end
end)
game.ReplicatedStorage.EarnCoins.OnServerEvent:Connect(function(player,coins)
local coinsDataStore = DataStore2("coins",player)
coinsDataStore:Increment(coins,defaultCoins)
end)
game.ReplicatedStorage.EarnGems.OnServerEvent:Connect(function(player,gems)
local gemsDataStore = DataStore2("gems",player)
gemsDataStore:Increment(gems,defaultGems)
end)
game.ReplicatedStorage.Enchance.OnServerEvent:Connect(function(player,cost,item,enchancedItem)
local gemsDataStore = DataStore2("gems",player)
if player.leaderstats.Gems.Value < cost then
game.ReplicatedStorage.NotEnoughGems:FireClient(player)
else
gemsDataStore:Increment(cost * -1,defaultGems)
item:Destroy()
local clonedItem = enchancedItem:Clone()
clonedItem.Parent = player.Backpack
end
end)
game.ReplicatedStorage.GainXP.OnServerEvent:Connect(function(player,amount)
local xpDataStore = DataStore2("xp",player)
xpDataStore:Increment(amount,defaultXP)
end)
game.ReplicatedStorage.LevelUp.OnServerEvent:Connect(function(player)
local mstaminaDataStore = DataStore2("mstamina",player)
local mmagicDataStore = DataStore2("mmagic",player)
mstaminaDataStore:Increment(25,defaultMStamina)
mmagicDataStore:Increment(25,defaultMMagic)
end)
//EDIT: yes i added the 2nd parameter GPE and if not gpe then return end in case someone nitpicks unnecessary details
Another problem is that it is quite long but if you read it and see something wrong then let me know. Also I have put this as a LocalScript in Startpack.
local uis = game:GetService("UserInputService")
local torso = script.Parent.Parent.Character.Torso or script.Parent.Parent.Character.UpperTorso
local TweenService = game:GetService("TweenService")
local db = true
function move(x)
local velocity = Instance.new("BodyVelocity")
velocity.Velocity = torso.CFrame.lookVector*50
velocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
velocity.Parent = x
end
uis.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.R and db then
db = false
local part = game:GetService("ReplicatedStorage").Union:Clone()
part.CFrame = torso.CFrame + torso.CFrame.lookVector*10
part.Parent = game.Workspace
local effect = game.ReplicatedStorage.Waterfall:Clone()
effect.CFrame = part.CFrame
local light = game:GetService("ReplicatedStorage").PointLight:Clone()
light.Parent = part
local weld = Instance.new("ManualWeld")
weld.Part0 = part
weld.Part1 = effect
weld.Parent = part
effect.Parent = part
local goal3 = {}
goal3.Size = Vector3.new(120,70,70)
local goal4 = {}
goal4.Size = goal3.Size
local tweenInfo = TweenInfo.new(2)
local tween3 = TweenService:Create(part, tweenInfo, goal3)
local tween4 = TweenService:Create(effect,tweenInfo, goal4)
tween3:Play(); tween4:Play()
game.Lighting.Blur.Enabled = true; game.Lighting.ColorCorrection.Enabled = true
move(part)
part.Anchored = false
effect.Anchored = false
move(effect)
local goal = {}
goal.Size = Vector3.new(30,7,7)
goal.Transparency = 0.4
local goal2 = {}
goal2.Size = goal.Size
local tweenInfo = TweenInfo.new(3)
local tween = TweenService:Create(part, tweenInfo, goal)
local tween2 = TweenService:Create(effect,tweenInfo, goal2)
tween:Play(); tween2:Play()
game:GetService("Debris"):AddItem(part,2)
game:GetService("Debris"):AddItem(effect,2)
wait(.5)
game.Lighting.Blur.Enabled = false; game.Lighting.ColorCorrection.Enabled = false
db = true
end
end)
The thing is pretty straightforward, It doesn't work when I publish the game and play it, but it only works in Roblox Studio.
It is not Filtering Enabled yet, and still doesn't work. I don't know exactly.
Fixed it lol i just moved the localscript from starterpack to startercharacter :D