im coming back to scripting and cant figure out why the error is popping up
local rp = game:GetService("ReplicatedStorage")
local Flash = rp:WaitForChild("Flash")
local TS = game:GetService("TweenService")
local Animation = script:WaitForChild("Animation")
local Mesh = script:WaitForChild("Mesh")
local Sound = script:WaitForChild("Sound")
Flash.OnServerEvent:Connect(function(player)
local Character = player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local Humrp = Character:WaitForChild("HumanoidRootPart")
local Effects = Instance.new("Folder",workspace)
Effects.Name = player.Name.." Effects"
local Flash = Mesh:WaitForChild("Flash"):Clone()
Flash.CFrame = Humrp.CFrame * CFrame.new(0,0,0)
Flash.Orientation = Flash.Orientation + Vector3.new(0,0,0)
Flash.Parent = Effects
local goal = {}
goal.Size = Flash.CFrame.new(0,8,0)
local info = TweenInfo.new(5, Enum.EasingStyle.Linear,Enum.EasingDirection.Out)
local tween = TweenService:Create(Flash,info,goal)
tween:Play()
end)
Error = W001: (25,16) Unknown global 'TweenService' Line = 25

1 comment
You've defined tweenservice as TS at line 3. Consider changing the variable name TS to TweenService, and the error you've got will disappear.