Im trying to make a part where when touched it will make your camera shake (also im using https://www.roblox.com/library/1461025953/Camera-Shaker because i was kinda lazy) the place where it has a red line is:
if not touched then touched = true camShake:Shake(CameraShaker.Presets.Explosion) end end
the bolded end is the problem here. What do i do now?
wait()
local part = workspace.SHAKE
local camera=workspace.CurrentCamera
local CameraShaker = require(game.ReplicatedStorage.CameraShaker)
local camShake = CameraShaker.new(Enum.RenderPriority.Camera.Value, function(shakeCFrame)
camera.CFrame = camera.CFrame * shakeCFrame
end)
camShake:Start()
local touched = false
if not touched then
touched = true
camShake:Shake(CameraShaker.Presets.Explosion)
end
end
part.touched:Connect:(touchedPart)

5 comments
ive tried it and it breaks the "part.touched:Connect:(touchedPart)"
give the entire script?
part.touched:Connect:(touchedPart) was breaking because it wasn't written correctly. Change it to part.touched:Connect(touchedPart)
Tried changing the "part touched" to that. Comes up with this error in the output. " ? attempt to call a nil value (x22) " and "Attempt to connect failed: Passed value is not a function"
touchedPart doesn't exist. You must rewrite the entire script because it has many errors.