#can anyone help me point out what the fuck is wrong with this script
1 messages · Page 1 of 1 (latest)
local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local event = game.ReplicatedStorage:WaitForChild("JumpscareEvent")
local jumpscareGui = playerGui:WaitForChild("Jumpscare")
local frame = jumpscareGui:WaitForChild("Frame")
local face = frame:WaitForChild("Face")
jumpscareGui.Enabled = true
frame.Visible = false
face.Visible = false
face.Size = UDim2.new(0, 250, 0, 250)
face.AnchorPoint = Vector2.new(0.5,0.5)
face.Position = UDim2.new(0.5,0,0.5,0)
local lighting = game:GetService("Lighting")
local cooldownTime = 6
local isCooldown = false
local function doJumpscare()
if isCooldown then return end
isCooldown = true
frame.Visible = true
face.Visible = true
face.ImageColor3 = Color3.new(1,1,1)
face.Size = UDim2.new(0, 250, 0, 250)
face.Rotation = 0
local color = Instance.new("ColorCorrectionEffect")
color.TintColor = Color3.fromRGB(255,0,0)
color.Contrast = -2
color.Saturation = 0
color.Parent = lighting
local blur = Instance.new("BlurEffect")
blur.Size = 0
blur.Parent = lighting
for i = 0, 1, 0.1 do
blur.Size = i*5
task.wait(0.01)
end
local origin = face.Position
for _ = 1, 50 do
face.Position = origin + UDim2.new(0, math.random(-10,10), 0, math.random(-10,10))
face.Rotation = math.random(-10,10)
task.wait(0.03)
end
local startSize = face.Size
local endSize = UDim2.new(0, 350, 0, 350)
local growDur = 0.8
local growStart = tick()
while tick() - growStart < growDur do
local t = (tick() - growStart)/growDur
t = ttt
face.Size = startSize:Lerp(endSize, t)
face.ImageColor3 = face.ImageColor3:Lerp(Color3.new(0,0,0), t)
task.wait()
end
task.wait(0.2)
face.Visible = false
frame.Visible = false
color:Destroy()
blur:Destroy()
task.delay(cooldownTime, function()
isCooldown = false
end)
end
event.OnClientEvent:Connect(doJumpscare)
this is the script
help me guys
i cant just figure it out
prove btw
volume warning)
Did u parent the gui?
Did u disable "ResetOnSpawn"
no
ue
You're declaring the gui at the top of the script, which mean it will never be updated. Even when destroyed. If u have ResetOnSpawn on it will destroy and rebuild the Gui if the player respawns
Disable it and try
i should set false to reset on spawn?
Yes
fucking chatgpt
He didn't know that u would die from that
@delicate laurel
ey bro
i need help again
does putting colorcorrection in the playergui makes the player see the effect but anyone doesnt
Color correction is a lighting only child i believe
what
To make only the player you want see it, you must assign color correction via the client
ColorCorrection. The instance correct?
Are we talking about the thing that changes the color of the players visuals
Make the color correction blue the player sees a blue tint. Right?
ye
Ok, yes. ColorCorrection can only work in the lighting
So in order to make one player see it but no one else, it must be ran through a LocalScript
Ok cool
but it dont work
So create a new colorcorrection instance or clone an already existing one
Then parent it to lighting
wait i thought that make other player can see
Nope, because a local script runs it
i always ask chatgpt
This is your basic client server relationship
Server replicates to all clients, clients do not replicate to server, or any other clients
and he always say the oppistie of you guys
That is your basic filtering enabled basics that you use to be able to toggle
okay thank you
well i just dont know who to belive
You can belive chatgpt who specificly tells you that it makes mistakes and to check all info
Or me and everyone else who uses studio daily and know the context of what you are asking
well chatgpt some times help me alat
like this
Sure it can get things right every now and again, but it has no context of your entire situation. We do.
put it in lighting from a local script
obviously because its information isnt even from its own intelligence