Hello devs!
I have a script for my boss fighting game, but it doesn’t work…
Here is my code:
local Circle = game.ServerStorage.ExplosionPart
local function onLoop(player)
if game.Lighting.ColorCorrection.TintColor == Color3.fromRGB(177, 0, 0) then
local char = player.CharacterAdded:Wait()
Circle.CFrame = char.Torso.CFrame
end
end
while wait(5) do
onLoop()
end
First of all, I’m 99% the script returns an error because player isn’t defined.
Second thing, CharacterAdded is an event, so instead of using player.CharacterAdded:Wait() you should use player.CharacterAdded:Connect(Your_Function_Here).