I have a script (that was from a question I asked a couple minutes ago) that teleports the player to the location of the cursor. How do I add a lighting effect (specifically grayscale) when this script is successfully executed? Here's the script.
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
local UserInputService = game:GetService("UserInputService")
local Mouse = Player:GetMouse()
local LastTeleported = 1
local CoolDown = 5
local Reach = 30
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == Enum.KeyCode.V and Mouse.Target then
local Pos = Mouse.Hit.p
local Distance = (Pos - HumanoidRootPart.Position).magnitude
if Distance <= Reach and tick() - LastTeleported >= CoolDown then
LastTeleported = tick()
Character:MoveTo ( Pos )
end
end
end)

2 comments
Wdym by grayscale? Everything will turn gray for the local player? And how long will it be gray for then?
Everything will turn gray for the local player, and only for a split second.